1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-11-20 14:04:03 +01:00
zsh/Completion/Core/_menu

24 lines
557 B
Plaintext
Raw Normal View History

1999-05-02 17:20:46 +02:00
#autoload
2000-04-01 22:43:43 +02:00
[[ _matcher_num -gt 1 ]] && return 1
1999-05-02 17:20:46 +02:00
# This completer is an example showing how menucompletion can be
# implemented with the new completion system.
# Use this one before the normal _complete completer, as in:
#
2000-04-01 22:43:43 +02:00
# zstyle ":completion:::::" completer _menu _complete
1999-05-02 17:20:46 +02:00
if [[ -n "$compstate[old_list]" ]]; then
# We have an old list, keep it and insert the next match.
compstate[old_list]=keep
compstate[insert]=$((compstate[old_insert]+1))
else
# No old list, make completion insert the first match.
compstate[insert]=1
fi
return 1