From 1cb11615aa337d98022a48c1c3c8c5c33b0b57c2 Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Wed, 2 Jul 2003 10:25:05 +0000 Subject: merge changes back from 4.1 --- Completion/Unix/Command/_look | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Completion/Unix/Command/_look (limited to 'Completion/Unix/Command/_look') 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 -- cgit 1.4.1