about summary refs log tree commit diff
path: root/Completion/Base/_command_names
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Base/_command_names')
-rw-r--r--Completion/Base/_command_names11
1 files changed, 7 insertions, 4 deletions
diff --git a/Completion/Base/_command_names b/Completion/Base/_command_names
index 61fea56dd..a0ec90262 100644
--- a/Completion/Base/_command_names
+++ b/Completion/Base/_command_names
@@ -1,18 +1,21 @@
 #compdef -command-
 
-local nm=$compstate[nmatches] ret=1
+local nm=$compstate[nmatches] ret=1 expl
 
 
 # Complete jobs in implicit fg and bg
 if [[ "$PREFIX[1]" = "%" ]]; then
-  compgen -j -P '%'
+  _description expl job
+  compgen "$expl[@]" -j -P '%'
   [[ nm -ne compstate[nmatches] ]] && return
 fi
 
-compgen -c && ret=0
+_description expl command
+compgen "$expl[@]" -c && ret=0
 
 if [[ nm -eq compstate[nmatches] ]]; then
-  _path_files -/g "*(*)"
+  _description expl 'executable file or directory'
+  _path_files "$expl[@]" -/g "*(*)"
 else
   return ret
 fi