zsh-workers
 help / color / mirror / code / Atom feed
* case insensitive completion
@ 2008-05-12 12:36 sergio
  2008-05-12 12:52 ` Peter Stephenson
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: sergio @ 2008-05-12 12:36 UTC (permalink / raw)
  To: Zsh hackers list

Hello.

I want to make case insensitive completion for russian language.

>From the manpage:
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}

but analog with russian:
zstyle ':completion:*' matcher-list 'm:{а-яА-Я}={А-Яа-я}
doesn't work

Also, this doesn't work too:
zstyle ':completion:*' matcher-list
'm:{абвгдеёжзийклмнопрстуфхцчшщъыьэюя}={АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ}'

'm:{я}={Я}' doesn't work for letter 'я', but 'm:{z}={Z}' works for
letter 'z'.

This works:
zstyle ':completion:*' matcher-list '+m:{a-zA-Z}={A-Za-z}' '+m:а=А'
'+m:б=Б' '+m:в=В' '+m:г=Г' '+m:д=Д' '+m:е=Е' '+m:ё=Ё' '+m:ж=Ж' '+m:з=З'
'+m:и=И' '+m:й=Й' '+m:к=К' '+m:л=Л' '+m:м=М' '+m:н=Н' '+m:о=О' '+m:п=П'
'+m:р=Р' '+m:с=С' '+m:т=Т' '+m:у=У' '+m:ф=Ф' '+m:х=Х' '+m:ц=Ц' '+m:ч=Ч'
'+m:ш=Ш' '+m:щ=Щ' '+m:ъ=Ъ' '+m:ы=Ы' '+m:ь=Ь' '+m:э=Э' '+m:ю=Ю' '+m:я=Я'
'+m:А=а' '+m:Б=б' '+m:В=в' '+m:Г=г' '+m:Д=д' '+m:Е=е' '+m:Ё=ё' '+m:Ж=ж'
'+m:З=з' '+m:И=и' '+m:Й=й' '+m:К=к' '+m:Л=л' '+m:М=м' '+m:Н=н' '+m:О=о'
'+m:П=п' '+m:Р=р' '+m:С=с' '+m:Т=т' '+m:У=у' '+m:Ф=ф' '+m:Х=х' '+m:Ц=ц'
'+m:Ч=ч' '+m:Ш=ш' '+m:Щ=щ' '+m:Ъ=ъ' '+m:Ы=ы' '+m:Ь=ь' '+m:Э=э' '+m:Ю=ю'
'+m:Я=я'

but this is not very well ):

zsh can lower and uppercase russian letters:
% qwe=йцу
% echo ${(U)qwe}
ЙЦУ
% echo ${(L)${(U)qwe}}
йцу

and in EXTENDED_GLOB there is globbing flag i which works right for
rissian language:

% setopt EXTENDED_GLOB
% ls  (#i)йцу
ЙцУ ЙЦУ

P.S.
Have zsh something for case switching.
It will be great to write something like:

zstyle ':completion:*' matcher-list 'm:$a=swithcase($a)

-- 
sergio


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-05-14 14:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-12 12:36 case insensitive completion sergio
2008-05-12 12:52 ` Peter Stephenson
2008-05-13  5:40 ` Andrey Borzenkov
2008-05-14  9:47 ` Peter Stephenson
2008-05-14 14:12   ` sergio

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).