R
R
rkfg2015-06-12 16:17:51
linux
rkfg, 2015-06-12 16:17:51

How to configure case-insensitive padding for cyrillic filenames in zsh?

It is not possible to make the addition of Russian-language file and directory names case-insensitive. There are no problems with English. Google found the following options:

zstyle ':completion:*' matcher-list 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} r:|[._-]=** r:|=**'
zstyle ':completion:*' completer _expand _complete _ignored _correct _approximate

The first line by itself does not correct the situation with Cyrillic, the second most significant parameter is _approximate. But he solves the problem partially, trying to guess the correct variant, but not to complete it. For example, I have two directories: "Templates" and "Orders", both with a capital letter. If I type ls саand press Tab, the "Templates" padding is suggested, while padding Саcorrectly to "Sanitary". If you write сан, then it unfolds correctly in the "Orders". This does not match the behavior with English-language names, nor the behavior when completing names with initial matching case.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Semyon Dubina, 2015-06-12
@sam002

Maybe ride?

zstyle ':completion:*' matcher-list 'm:{[:lower:][:upper:]а-яА-Я}={[:upper:][:lower:]А-Яа-я}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'

S
Sergey N, 2015-06-18
@Albibek

You don't have a case-sensitive issue when looking for a match. At you all vernododno is filled on "san". Matching "Templates" may be due to the approximate or correct options. zsh thinks you made a mistake and wanted to type "sha". Maybe there is an opportunity to somehow change the priority of add-on modules. For example, so that the register check would work first, and only then the correction.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question