about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2002-02-18 14:27:36 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2002-02-18 14:27:36 +0000
commit901d8b4c97f2f0855005825764c01d00d6d47f19 (patch)
treef84ed42dca9b483f737390ddd6646e77111852de
parente8487f3198d91d3c13264ab87a494666af708ae4 (diff)
downloadzsh-901d8b4c97f2f0855005825764c01d00d6d47f19.tar.gz
zsh-901d8b4c97f2f0855005825764c01d00d6d47f19.tar.xz
zsh-901d8b4c97f2f0855005825764c01d00d6d47f19.zip
fix test for prefix-needed (16667)
-rw-r--r--ChangeLog5
-rw-r--r--Completion/Base/Utility/_arguments5
2 files changed, 7 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 0162f9492..c23d27729 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-02-18  Sven Wischnowsky  <wischnow@zsh.org>
+
+	* 16667: Completion/Base/Utility/_arguments: fix test for
+	prefix-needed
+
 2002-02-17  Clint Adams  <clint@zsh.org>
 
 	* 16662: Completion/Unix/Command/_cdcd: use parameter expansion
diff --git a/Completion/Base/Utility/_arguments b/Completion/Base/Utility/_arguments
index b4f3c599f..826d5b5c2 100644
--- a/Completion/Base/Utility/_arguments
+++ b/Completion/Base/Utility/_arguments
@@ -331,11 +331,10 @@ if (( $# )) && comparguments -i "$autod" "$singopt[@]" "$@"; then
           fi
         done
       fi
-      if [[ -z "$hasopts" &&
+      if _requested options &&
+         [[ -z "$hasopts" &&
             -z "$matched" &&
-            ( -z "$tried" || -n "$alwopt" ) &&
             ( -z "$aret" || "$PREFIX" = "$origpre" ) ]] &&
-          _requested options &&
           { ! zstyle -T ":completion:${curcontext}:options" prefix-needed ||
             [[ "$origpre" = [-+]* || -z "$aret$mesg$tried" ]] } ; then
 	local prevpre="$PREFIX" previpre="$IPREFIX"