about summary refs log tree commit diff
path: root/Completion/User
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/User')
-rw-r--r--Completion/User/_sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/Completion/User/_sh b/Completion/User/_sh
index ea0fcfc11..22379856e 100644
--- a/Completion/User/_sh
+++ b/Completion/User/_sh
@@ -4,5 +4,10 @@ if (( CURRENT == ${words[(i)-c]} + 1 )); then
   compset -q
   _normal
 else
+  local n=${words[(b:2:i)[^-]*]}
+  if (( n <= CURRENT )); then
+    compset -n $n
+    _normal && return 0
+  fi
   _default
 fi