about summary refs log tree commit diff
path: root/Completion/Builtins/_hash
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-11-15 12:01:46 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-11-15 12:01:46 +0000
commit35b2633ad941966f5fca07b625a594a5b68c0fdb (patch)
treeb54740d014e594ba5d81931cdcdb3387bcf9dfca /Completion/Builtins/_hash
parentbb98460a01ce1f6c1e71f7e401f782c81b71486b (diff)
downloadzsh-35b2633ad941966f5fca07b625a594a5b68c0fdb.tar.gz
zsh-35b2633ad941966f5fca07b625a594a5b68c0fdb.tar.xz
zsh-35b2633ad941966f5fca07b625a594a5b68c0fdb.zip
manual/8639
Diffstat (limited to 'Completion/Builtins/_hash')
-rw-r--r--Completion/Builtins/_hash22
1 files changed, 7 insertions, 15 deletions
diff --git a/Completion/Builtins/_hash b/Completion/Builtins/_hash
index 24a9964b9..e5f182528 100644
--- a/Completion/Builtins/_hash
+++ b/Completion/Builtins/_hash
@@ -4,23 +4,15 @@ local expl
 
 if [[ "$words[2]" = -*d* ]]; then
   if compset -P 1 '*\='; then
-    _tags - -d-value files || return 1
-
-    _path_files -g '*(-/)'
+    _wanted -C -d-value files && _path_files -g '*(-/)'
   else
-    _tags - -d named-directories || return 1
-
-    _description expl 'named directory'
-    compadd "$expl[@]" -q -S '=' - "${(@k)nameddirs}"
+    _wanted -C -d named-directories expl 'named directory' &&
+        compadd "$expl[@]" -q -S '=' - "${(@k)nameddirs}"
   fi
 elif compset -P 1 '*\='; then
-  _tags value executables || return 1
-
-  _description expl 'executable file'
-  _files "$expl[@]" -g '*(*)'
+  _wanted -C value values executables expl 'executable file' &&
+      _files "$expl[@]" -g '*(*)'
 else
-  _tags any:argument commands || return 1
-
-  _description expl command
-  compadd "$expl[@]" -q -S '=' - "${(@k)commands}"
+  _wanted -C name commands expl command &&
+      compadd "$expl[@]" -q -S '=' - "${(@k)commands}"
 fi