Repository navigation
install.sh: Match font names exactly - #2093
Merged
Merged
Conversation
[why] Since the case insensitive name lookup the requested name is used as an unanchored regex against the released font names, and the first name contained in the request wins. 'install UbuntuMono' downloads Ubuntu, InconsolataGo gives Inconsolata, IosevkaTerm gives Iosevka. This also hits the interactive menu and 'install all', because they pass the exact names through the same lookup. [how] Compare with a quoted == instead. nocasematch still makes it case insensitive. AI disclosure: this change was written with Claude Code (Claude Opus 5.5).
Collaborator
|
Thanks for the PR. For humans...: I think I messed lhs and rhs of the regex operator. |
Signed-off-by: Fini Jastrow <ulf.fini.jastrow@desy.de>
Collaborator
|
@allcontributors please add @Dev-next-gen for code |
Contributor
|
I've put up a pull request to add @Dev-next-gen! 🎉 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
./install.sh install UbuntuMonodownloads and installs Ubuntu. Same for InconsolataGo (gets Inconsolata) and IosevkaTerm (gets Iosevka). Since 7008d6dnerd_find_spellinguses the requested name as an unanchored regex and returns the first released name that is contained in it, and the shorter name comes first in the asset list. The interactive menu andinstall allgo through the same lookup with exact names, so they are affected too.The fix compares with a quoted
==.nocasematchis still set, soinstall ubuntustill resolves to Ubuntu.I checked it with a dry run against v3.5.1 (
GH_RELEASE_TAG=v3.5.1 ./install.sh -d install UbuntuMono, same for InconsolataGo and ubuntu). Before: the "download & install font" line says Ubuntu and Inconsolata. After: UbuntuMono and InconsolataGo, andubuntustill gives Ubuntu. An unknown name still ends withCan not find font.Requirements / Checklist
Issue number where discussion took place: #xxx
What does this Pull Request (PR) do?
Makes
install.sh install <name>pick the font with that exact (case insensitive) name instead of the first font whose name is contained in it.How should this be manually tested?
./install.sh -d install UbuntuMonoshould download UbuntuMono, not Ubuntu.Any background context you can provide?
The lookup was introduced in 7008d6d (case insensitive font names). The commit message also discloses the AI use, as contributing.md asks.
What are the relevant tickets (if any)?
None.
Found by a defect-hunting pipeline I build and run (Dev-next-gen), using Claude Code with Anthropic's Claude Opus 5.5.