summary refs log tree commit diff
path: root/Completion/Unix/Command
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2001-04-02 12:01:38 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2001-04-02 12:01:38 +0000
commitcf3107f6b6d7eb68288f9329700f22b82670263b (patch)
treea051a8a1580b74dce61c78ad5aec5ff72d864f69 /Completion/Unix/Command
parentf1df529dc8839b75f254d0c9bb20bc67eae4b64b (diff)
downloadzsh-cf3107f6b6d7eb68288f9329700f22b82670263b.tar.gz
zsh-cf3107f6b6d7eb68288f9329700f22b82670263b.tar.xz
zsh-cf3107f6b6d7eb68288f9329700f22b82670263b.zip
moved from Completion/User/_sh
Diffstat (limited to 'Completion/Unix/Command')
-rw-r--r--Completion/Unix/Command/_sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/Completion/Unix/Command/_sh b/Completion/Unix/Command/_sh
new file mode 100644
index 000000000..22379856e
--- /dev/null
+++ b/Completion/Unix/Command/_sh
@@ -0,0 +1,13 @@
+#compdef sh ksh bash zsh csh tcsh rc
+
+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