From bbbf07a3e7969edebdb654832056b2d27747a00e Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Thu, 5 Apr 2001 12:12:45 +0000 Subject: complete only those single letter options with the right prefix character (13908) --- Completion/Base/Utility/_arguments | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Completion') 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)|:*)}" ) -- cgit 1.4.1