mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-26 05:51:08 +02:00
moved from Completion/User/_look
This commit is contained in:
parent
df01173ce9
commit
2193b938ce
1 changed files with 21 additions and 0 deletions
21
Completion/Unix/Command/_look
Normal file
21
Completion/Unix/Command/_look
Normal file
|
@ -0,0 +1,21 @@
|
|||
#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
|
Loading…
Reference in a new issue