summaryrefslogtreecommitdiffstats
path: root/Completion/Unix/Command/_sh
diff options
context:
space:
mode:
authorOliver Kiddle <opk@users.sourceforge.net>2003-05-12 14:03:26 +0000
committerOliver Kiddle <opk@users.sourceforge.net>2003-05-12 14:03:26 +0000
commit453df705675869123675ba399f08e92ca658aa2f (patch)
tree798f662aa7409f830c84f4bc8897d92f88fe57a6 /Completion/Unix/Command/_sh
parent18524: sepjoin !heap bug cause problem in vared (diff)
downloadzsh-453df705675869123675ba399f08e92ca658aa2f.tar
zsh-453df705675869123675ba399f08e92ca658aa2f.tar.gz
zsh-453df705675869123675ba399f08e92ca658aa2f.tar.bz2
zsh-453df705675869123675ba399f08e92ca658aa2f.tar.lz
zsh-453df705675869123675ba399f08e92ca658aa2f.tar.xz
zsh-453df705675869123675ba399f08e92ca658aa2f.tar.zst
zsh-453df705675869123675ba399f08e92ca658aa2f.zip
merge changes from 4.1
Diffstat (limited to 'Completion/Unix/Command/_sh')
-rw-r--r--Completion/Unix/Command/_sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/Completion/Unix/Command/_sh b/Completion/Unix/Command/_sh
new file mode 100644
index 000000000..cc2139d7f
--- /dev/null
+++ b/Completion/Unix/Command/_sh
@@ -0,0 +1,15 @@
+#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
+ _alternative \
+ 'files:file:_files' \
+ 'commands:command:_normal' && return 0
+ fi
+ _default
+fi