2000-05-05 13:33:28 +02:00
|
|
|
#compdef look
|
|
|
|
|
2000-05-05 15:38:45 +02:00
|
|
|
local curcontext="$curcontext" state line
|
2000-05-05 13:33:28 +02:00
|
|
|
typeset -A opt_args
|
|
|
|
|
2000-05-05 15:38:45 +02:00
|
|
|
_arguments -C -s \
|
2000-05-05 13:33:28 +02:00
|
|
|
'-t+[termination character]:termination character:' \
|
|
|
|
'-f[case insensitive]' \
|
|
|
|
'-d[dictionary order]' \
|
2000-05-05 16:47:54 +02:00
|
|
|
':string:->string' \
|
2000-05-16 02:51:04 +02:00
|
|
|
':dictionary file:_files' && return 0
|
2000-05-05 13:33:28 +02:00
|
|
|
|
|
|
|
case "$state" in
|
|
|
|
string)
|
2000-05-16 02:51:04 +02:00
|
|
|
if [[ -n "$PREFIX" ]]; then
|
|
|
|
_wanted values expl 'word prefix' compadd - $(_call values $words[1] $PREFIX)
|
|
|
|
else
|
|
|
|
_message 'word prefix'
|
|
|
|
fi
|
2000-05-05 13:33:28 +02:00
|
|
|
;;
|
|
|
|
esac
|