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_names10
1 files changed, 7 insertions, 3 deletions
diff --git a/Completion/Base/_command_names b/Completion/Base/_command_names
index eab314dfa..f21af674c 100644
--- a/Completion/Base/_command_names
+++ b/Completion/Base/_command_names
@@ -1,7 +1,11 @@
 #defcomp -command-
 
-local nm=$compstate[nmatches]
+local nm=$compstate[nmatches] ret=1
 
-compgen -c
+compgen -c && ret=0
 
-[[ nm -eq compstate[nmatches] ]] && _path_files -/g "*(*)"
+if [[ nm -eq compstate[nmatches] ]]; then
+  _path_files -/g "*(*)"
+else
+  return ret
+fi