about summary refs log tree commit diff
path: root/Completion/User/_look
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-05-05 13:38:45 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-05-05 13:38:45 +0000
commit9f9b6e165516c4ee59b1f5b609a6890ccc3d598f (patch)
tree86460ad1a9886e6030fc1b1d1aee57668f28aa01 /Completion/User/_look
parent04118530d4157d3494349e2628246b78465e08f8 (diff)
downloadzsh-9f9b6e165516c4ee59b1f5b609a6890ccc3d598f.tar.gz
zsh-9f9b6e165516c4ee59b1f5b609a6890ccc3d598f.tar.xz
zsh-9f9b6e165516c4ee59b1f5b609a6890ccc3d598f.zip
completion function cleanup for `_arguments' with the `-C' option and using it's return value (11195)
Diffstat (limited to 'Completion/User/_look')
-rw-r--r--Completion/User/_look11
1 files changed, 5 insertions, 6 deletions
diff --git a/Completion/User/_look b/Completion/User/_look
index 14d6285b6..74e7ab447 100644
--- a/Completion/User/_look
+++ b/Completion/User/_look
@@ -1,18 +1,17 @@
 #compdef look
 
-local context state line
+local curcontext="$curcontext" state line
 typeset -A opt_args
 
-_arguments -s \
+_arguments -C -s \
   '-t+[termination character]:termination character:' \
   '-f[case insensitive]' \
   '-d[dictionary order]' \
-  ':string:->string'
+  ':string:->string' && return 0
 
 case "$state" in
 string)
-  if [[ -n "$PREFIX" ]]; then
-    compadd - $(_call values $words[1] $PREFIX)
-  fi
+  [[ -n "$PREFIX" ]] &&
+      _wanted values expl value compadd - $(_call values $words[1] $PREFIX)
   ;;
 esac