summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--Completion/Unix/Command/_sh9
2 files changed, 11 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 9a9b68a97..95b1d59da 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
2001-08-28 Peter Stephenson <pws@pwstephenson.fsnet.co.uk>
+ * 15722: Completion/Unix/Command/_sh: handle zsh options.
+
* 15720: Functions/Misc/zmv: use ${(e)...} as suggested by
Bart; fix problem with option arguments with special characters;
more consistency with shifting arguments; fix verbose mode
diff --git a/Completion/Unix/Command/_sh b/Completion/Unix/Command/_sh
index 22379856e..559c6ad1b 100644
--- a/Completion/Unix/Command/_sh
+++ b/Completion/Unix/Command/_sh
@@ -1,5 +1,14 @@
#compdef sh ksh bash zsh csh tcsh rc
+if [[ $service == zsh ]]; then
+ # try a bit harder
+ if [[ ${words[CURRENT-1]} == -o ]]; then
+ _options
+ # no other possibilities
+ return
+ fi
+fi
+
if (( CURRENT == ${words[(i)-c]} + 1 )); then
compset -q
_normal