Skip to content
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

Case insensitive autocomplete doesn’t work with Cyrillic letters #9947

Open
pepelsbey opened this issue Jun 3, 2021 · 3 comments
Open
Labels
Area: core Issue or PR related to core parts of the project Bug Something isn't working Topic: completion Pull Request or issue regarding completion

Comments

@pepelsbey
Copy link

pepelsbey commented Jun 3, 2021

Describe the bug

Case insensitive autocomplete doesn’t work with Cyrillic letters, but works with Latin ones.

To Reproduce

  1. Create two folders:
  • mkdir Latin
  • mkdir Кириллица
  1. Type cd l and press Tab
  2. Type cd к and press Tab

Expected behavior

  • cd Latin/ suggest on step 2
  • cd Кириллица/ suggest on step 3

Desktop

  • macOS
  • Latest ohmyzsh
  • zsh 5.8
  • iTerm2, Terminal

Additional context

  • Suggest only works for Cyrillic if you explicitly type cd К
  • My .zshrc is default, I’ve just installed it
@pepelsbey pepelsbey added the Bug Something isn't working label Jun 3, 2021
@pepelsbey
Copy link
Author

pepelsbey commented Jun 3, 2021

I think I fixed it by adding a custom group to completion.zsh, but it doesn’t look like a reliable solution. It’s not just Latin and Cyrillic out there, right?

if [[ "$CASE_SENSITIVE" = true ]]; then
-  zstyle ':completion:*' matcher-list 'r:|=*' 'l:|=* r:|=*'
+  zstyle ':completion:*' matcher-list 'r:|=*' 'l:|=* r:|=*' 'm:{а-яё}={А-ЯЁ}'
else

(And I still have no idea what I just did there, but it kinda works).

@denysdovhan
Copy link
Contributor

Please, don’t forget about Cyrillic letters from other languages, like Ї, Ґ, Є, Ў.

AFAIK, there are also specific letters in Bulgarian and Serbian languages (needs investigation)

@pepelsbey
Copy link
Author

Please, don’t forget about Cyrillic letters from other languages, like Ї, Ґ, Є, Ў.

Absolutely! That’s what I’m talking about. It wouldn’t make a reliable solution to list all the letters in the world. We need a universal match. I’d love to suggest it, but I’m not sure if I get what’s going on here: 'r:|=*' 'l:|=* r:|=*'.

@mcornella mcornella added Area: core Issue or PR related to core parts of the project Topic: completion Pull Request or issue regarding completion labels Jan 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: core Issue or PR related to core parts of the project Bug Something isn't working Topic: completion Pull Request or issue regarding completion
Projects
Status: Backlog
Development

No branches or pull requests

3 participants