diff options
author | Oliver Kiddle <opk@users.sourceforge.net> | 2003-07-02 10:25:05 +0000 |
---|---|---|
committer | Oliver Kiddle <opk@users.sourceforge.net> | 2003-07-02 10:25:05 +0000 |
commit | 1cb11615aa337d98022a48c1c3c8c5c33b0b57c2 (patch) | |
tree | 666f075271d340fabcc63b564e1c296aa3715f9e /Completion/Unix/Command/_look | |
parent | bedc4995d225195a2e48c0d9430ceb97adfb7e2f (diff) | |
download | zsh-1cb11615aa337d98022a48c1c3c8c5c33b0b57c2.tar.gz zsh-1cb11615aa337d98022a48c1c3c8c5c33b0b57c2.tar.xz zsh-1cb11615aa337d98022a48c1c3c8c5c33b0b57c2.zip |
merge changes back from 4.1
Diffstat (limited to 'Completion/Unix/Command/_look')
-rw-r--r-- | Completion/Unix/Command/_look | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Completion/Unix/Command/_look b/Completion/Unix/Command/_look new file mode 100644 index 000000000..a0258c276 --- /dev/null +++ b/Completion/Unix/Command/_look @@ -0,0 +1,23 @@ +#compdef look + +local curcontext="$curcontext" state line ret=1 +typeset -A opt_args + +_arguments -C -s \ + '-t+[termination character]:termination character:' \ + '-f[case insensitive]' \ + '-d[dictionary order]' \ + ':string:->string' \ + ':dictionary file:_files' && ret=0 + +case "$state" in +string) + if [[ -n "$PREFIX" ]]; then + _wanted values expl 'word prefix' compadd - $(_call_program values $words[1] $PREFIX) && return + else + _message 'word prefix' + fi + ;; +esac + +return ret |