about summary refs log tree commit diff
path: root/Completion/Builtins/_bindkey
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Builtins/_bindkey')
-rw-r--r--Completion/Builtins/_bindkey12
1 files changed, 4 insertions, 8 deletions
diff --git a/Completion/Builtins/_bindkey b/Completion/Builtins/_bindkey
index 31215a576..98459916b 100644
--- a/Completion/Builtins/_bindkey
+++ b/Completion/Builtins/_bindkey
@@ -10,13 +10,9 @@
 local expl
 
 if [[ "$words[2]" = -*[DAN]* || "$words[CURRENT-1]" = -*M ]]; then
-  _tags -M keymaps || return 1
-
-  _description expl keymap
-  compadd "$expl[@]" - "$keymaps[@]"
+  _wanted -C -M keymaps expl keymap &&
+      compadd "$expl[@]" - "$keymaps[@]"
 else
-  _tags any:argument widgets || return 1
-
-  _description expl widget
-  compadd "$expl[@]" -M 'r:|-=* r:|=*' - "${(@k)widgets}"
+  _wanted widgets expl widget &&
+      compadd "$expl[@]" -M 'r:|-=* r:|=*' - "${(@k)widgets}"
 fi