* [Comm] zsh menu completion
@ 2006-12-15 13:36 Maxim Tyurin
2006-12-18 14:19 ` Fr. Br. George
0 siblings, 1 reply; 4+ messages in thread
From: Maxim Tyurin @ 2006-12-15 13:36 UTC (permalink / raw)
To: community
Hi!
Что-то не могу победить настройку menu в автодополнении.
Чего хочется: чтоб для kill выводило меню всегда, а в остальных
случаях только если меньше 7 вариантов.
Но не работает :(
Точнее вызывает меню только если меньше 7 вариантов всегда.
Где я ошибся?
Вот настройки:
autoload -U compinit
compinit
autoload -U history-search-end
zle -N history-beginning-search-backward-end history-search-end
zle -N history-beginning-search-forward-end history-search-end
setopt histexpiredupsfirst histfindnodups histignoredups histnostore histverify
setopt autocd bgnice correct nohup nonomatch
setopt listpacked listtypes
# Меню автодополнения
zmodload zsh/complist
setopt menucomplete
# Выводить меню только если меньше 7 вариантов
zstyle ':completion:*:default' menu no=7 select
# Регистронезависимое автодополнение
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z} m:{а-я}={А-Я}'
# Создаем кеш для автодополнения (для команд типа apt-get у которых большая база)
zstyle :completion:* use-cache on
zstyle :completion:* cache-path ~/tmp/.zsh_cache
# Меняет список вариантов на список сделующих вариантов
bindkey -M menuselect "/" accept-and-infer-next-history
# Автодополнение для kill. По умолчанию используется просто ps...
zstyle ':completion:*:processes' command 'ps xuf'
zstyle ':completion:*:processes' sort false
# Дальше набираем, например, kill <Tab> и пробелом отмечаем
# процессы, которые хотим закилять ;-)
zstyle ':completion:*:processes' menu yes=long-list select
# То же самое для killall. Почему-то по умолчанию processes-names вызывает ps ho command для пользователя и ps xaho command для root.
zstyle ':completion:*:processes-names' command 'ps xho command'
# Добавим цвета в меню
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
--
With Best Regards, Maxim Tyurin
JID: MrKooll@jabber.pibhe.com
___
/ _ )__ _____ ___ ____ _______ _____
/ _ / // / _ \/ _ `/ _ `/ __/ // (_-<
/____/\_,_/_//_/\_, /\_,_/_/ \_,_/___/
/___/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Comm] zsh menu completion
2006-12-15 13:36 [Comm] zsh menu completion Maxim Tyurin
@ 2006-12-18 14:19 ` Fr. Br. George
2006-12-18 16:22 ` Maxim Tyurin
0 siblings, 1 reply; 4+ messages in thread
From: Fr. Br. George @ 2006-12-18 14:19 UTC (permalink / raw)
To: ALT Linux Community
On Fri, Dec 15, 2006 at 03:36:56PM +0200, Maxim Tyurin wrote:
> Hi!
> Что-то не могу победить настройку menu в автодополнении.
> Чего хочется: чтоб для kill выводило меню всегда, а в остальных
> случаях только если меньше 7 вариантов.
> Но не работает :(
> Точнее вызывает меню только если меньше 7 вариантов всегда.
Галлюциноген какой-то: yes=long работает, yes=long-list -- нет :(
> Где я ошибся?
Не думаю, что вы ошиблись. Это шарики у авторов zsh захлестнули за ролики.
Вот у меня оно вообще слетает по segfault при попытке вывести второй
экран. Эх. Перейти, что ли, на bash десять лет спустя?
--
Георгий Курячий (aka Fr. Br. George)
Руководитель образовательных проектов ALT Linux
mailto : george at altlinux_ru
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Comm] zsh menu completion
2006-12-18 14:19 ` Fr. Br. George
@ 2006-12-18 16:22 ` Maxim Tyurin
2006-12-18 17:22 ` Maxim Tyurin
0 siblings, 1 reply; 4+ messages in thread
From: Maxim Tyurin @ 2006-12-18 16:22 UTC (permalink / raw)
To: ALT Linux Community
Fr. Br. George writes:
> On Fri, Dec 15, 2006 at 03:36:56PM +0200, Maxim Tyurin wrote:
>> Hi!
>> Что-то не могу победить настройку menu в автодополнении.
>> Чего хочется: чтоб для kill выводило меню всегда, а в остальных
>> случаях только если меньше 7 вариантов.
>> Но не работает :(
>> Точнее вызывает меню только если меньше 7 вариантов всегда.
> Галлюциноген какой-то: yes=long работает, yes=long-list -- нет :(
yes=long select=long
без select=long тоже не хочет
long-list не работает никак
>> Где я ошибся?
> Не думаю, что вы ошиблись. Это шарики у авторов zsh захлестнули за ролики.
>
> Вот у меня оно вообще слетает по segfault при попытке вывести второй
> экран. Эх. Перейти, что ли, на bash десять лет спустя?
На bash как-то не тянет ;)
--
With Best Regards, Maxim Tyurin
JID: MrKooll@jabber.pibhe.com
___
/ _ )__ _____ ___ ____ _______ _____
/ _ / // / _ \/ _ `/ _ `/ __/ // (_-<
/____/\_,_/_//_/\_, /\_,_/_/ \_,_/___/
/___/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Comm] zsh menu completion
2006-12-18 16:22 ` Maxim Tyurin
@ 2006-12-18 17:22 ` Maxim Tyurin
0 siblings, 0 replies; 4+ messages in thread
From: Maxim Tyurin @ 2006-12-18 17:22 UTC (permalink / raw)
To: ALT Linux Community
Maxim Tyurin writes:
> Fr. Br. George writes:
>
>> On Fri, Dec 15, 2006 at 03:36:56PM +0200, Maxim Tyurin wrote:
>>> Hi!
>>> Что-то не могу победить настройку menu в автодополнении.
>>> Чего хочется: чтоб для kill выводило меню всегда, а в остальных
>>> случаях только если меньше 7 вариантов.
>>> Но не работает :(
>>> Точнее вызывает меню только если меньше 7 вариантов всегда.
>> Галлюциноген какой-то: yes=long работает, yes=long-list -- нет :(
>
> yes=long select=long
> без select=long тоже не хочет
> long-list не работает никак
Точнее
yes=long select=1
иначе меню вылазит только когда вывод ps не помещается в окно
терминала
--
With Best Regards, Maxim Tyurin
JID: MrKooll@jabber.pibhe.com
___
/ _ )__ _____ ___ ____ _______ _____
/ _ / // / _ \/ _ `/ _ `/ __/ // (_-<
/____/\_,_/_//_/\_, /\_,_/_/ \_,_/___/
/___/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-12-18 17:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-15 13:36 [Comm] zsh menu completion Maxim Tyurin
2006-12-18 14:19 ` Fr. Br. George
2006-12-18 16:22 ` Maxim Tyurin
2006-12-18 17:22 ` Maxim Tyurin
ALT Linux Community general discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
public-inbox-index community
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.community
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git