1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-11-20 14:04:03 +01:00
zsh/Completion/User/_look
Tanaka Akira c3f2434dfa 11204: Completion/User/_look: use more precise explanation and
complete an optional second argument.
2000-05-05 14:47:54 +00:00

19 lines
417 B
Plaintext

#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 -f' && return 0
case "$state" in
string)
[[ -n "$PREFIX" ]] &&
_wanted values expl 'word prefix' compadd - $(_call values $words[1] $PREFIX)
;;
esac