summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--Completion/Base/Utility/_arguments2
2 files changed, 5 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 69c6ea89f..90b22f47b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2001-04-05  Sven Wischnowsky  <wischnow@zsh.org>
 
+	* 13908: Completion/Base/Utility/_arguments: complete only
+	those single letter options with the right prefix character
+
 	* 13907: Src/params.c: fix for reverse subscripting of strings
 	as second part of subscript ($a[x,(r)..])
 
diff --git a/Completion/Base/Utility/_arguments b/Completion/Base/Utility/_arguments
index 33f4c1e33..1c5411fe3 100644
--- a/Completion/Base/Utility/_arguments
+++ b/Completion/Base/Utility/_arguments
@@ -348,6 +348,8 @@ if (( $# )) && comparguments -i "$autod" "$singopt[@]" "$@"; then
 
 	    tmp1=( "$next[@]" "$direct[@]" "$odirect[@]" "$equal[@]" )
 
+            [[ "$PREFIX" = [-+]* ]] && tmp1=( "${(@M)tmp1:#${PREFIX[1]}*}" )
+
             [[ "$single" = next ]] &&
                 tmp1=( "${(@)tmp1:#[-+]${PREFIX[-1]}((#e)|:*)}" )