New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: Allow searching for names with diacritics using "regular" characters #7142
Comments
Thanks for the feature request! I'm fully on board with this. 👍 Notes for would-be implementersWherever we instantiate a &survey.Select{
Filter: func(filterValue, optValue string, index int) bool {
filterValue = strings.ToLower(filterValue)
return strings.Contains(strings.ToLower(optValue), filterValue)
},
} To make it happen that a letter Then, a Filter func with transliteration capabilities should be passed to places where we instantiate |
@benjlevesque thanks very much for working on this! I'm using $ gh --version
gh version 2.29.0 (2023-05-10)
https://github.com/cli/cli/releases/tag/v2.29.0
gh pr create
Warning: 2 uncommitted changes
? Reviewers mi [Use arrows to move, space to select, <right> to all, <left> to none, type to filter]
> [ ] testuser (Miķelis test) if I then type
Does the LatinMatchingFilter need to be applied somewhere else as well? |
@danielcompton I think you are right, the filter should probably be applied here: cli/pkg/cmd/pr/shared/survey.go Line 168 in 9846af1
I'm having trouble testing since I don't share a repo with someone with diacritics in their username, would you mind testing? Prompt: &survey.MultiSelect{
Message: "What would you like to add?",
Options: extraFieldsOptions,
Filter: prompter.LatinMatchingFilter, // add this
}, |
@benjlevesque Feel free to open a PR, even if you are unable to test this. Yes, the LatinMatchingFilter should be applied to all survey prompts within the function that you've linked. I have asked for that here |
Describe the feature or problem you’d like to solve
I use the
gh
CLI to open PRs for review by coworkers. I like the feature where you can add reviewers from the CLI. I work with some coworkers whose names have diacritics, e.g. Miķelis, Klāvs, Dāvis.When I try and search for their name in the CLI, I will type something like:
When I then type
k
, the person's name disappears from the list:Proposed solution
Allow searching for names with diacritics using "regular" characters. This will help users who have names that aren't "regular" names. I would expect when I type
mik
, this would match a user namedMiķelis
.The text was updated successfully, but these errors were encountered: