1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-10-02 17:01:19 +02:00
zsh/Completion/Unix/Command/_look

22 lines
465 B
Plaintext
Raw Normal View History

2001-04-02 13:55:25 +02:00
#compdef look
local curcontext="$curcontext" state line
typeset -A opt_args
_arguments -C -s \
'-t+[termination character]:termination character:' \
'-f[case insensitive]' \
'-d[dictionary order]' \
':string:->string' \
':dictionary file:_files' && return 0
case "$state" in
string)
if [[ -n "$PREFIX" ]]; then
_wanted values expl 'word prefix' compadd - $(_call_program values $words[1] $PREFIX)
else
_message 'word prefix'
fi
;;
esac