about summary refs log tree commit diff
path: root/Completion/Builtins/_enable
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Builtins/_enable')
-rw-r--r--Completion/Builtins/_enable22
1 files changed, 17 insertions, 5 deletions
diff --git a/Completion/Builtins/_enable b/Completion/Builtins/_enable
index 483661efe..a698a3895 100644
--- a/Completion/Builtins/_enable
+++ b/Completion/Builtins/_enable
@@ -1,10 +1,22 @@
 #compdef enable
 
-local prev="$words[CURRENT-1]" ret=1
+local prev="$words[CURRENT-1]" ret=1 expl
 
-[[ "$prev" = -*a* ]] && compgen -da && ret=0
-[[ "$prev" = -*f* ]] && compgen -dF && ret=0
-[[ "$prev" = -*r* ]] && compgen -dw && ret=0
-[[ "$prev" != -* ]]  && compgen -dB && ret=0
+if [[ "$prev" = -*a* ]]; then
+  _description expl alias
+  compgen "$expl[@]" -da && ret=0
+fi
+if [[ "$prev" = -*f* ]]; then
+  _description expl 'shell function'
+  compgen "$expl[@]" -dF && ret=0
+fi
+if [[ "$prev" = -*r* ]]; then
+  _description expl 'reserved word'
+  compgen "$expl[@]" -dw && ret=0
+fi
+if [[ "$prev" != -* ]]; then
+  _description expl 'builtin command'
+  compgen "$expl[@]" -dB && ret=0
+fi
 
 return ret