From c83d16f8ee5721de1da3e8449c30a31ca1372d28 Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Wed, 25 Jul 2001 12:18:23 +0000 Subject: another fix for 15477 (separator strings); add list-separator style (15484) --- Completion/Zsh/Command/_zstyle | 5 +++++ Completion/Zsh/Context/_subscript | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'Completion/Zsh') diff --git a/Completion/Zsh/Command/_zstyle b/Completion/Zsh/Command/_zstyle index c72109433..d8005ee30 100644 --- a/Completion/Zsh/Command/_zstyle +++ b/Completion/Zsh/Command/_zstyle @@ -59,6 +59,7 @@ styles=( list-packed c:bool list-prompt c: list-rows-first c:bool + list-separator c:separator list-suffixes c:bool local c: match-original c:match-orig @@ -310,6 +311,10 @@ while [[ -n $state ]]; do _message 'pattern matching prefix to keep' ;; + separator) + _message 'separator string' + ;; + urgh) _wanted values expl no compadd no false off 0 ;; diff --git a/Completion/Zsh/Context/_subscript b/Completion/Zsh/Context/_subscript index 224fbb148..6328ba10d 100644 --- a/Completion/Zsh/Context/_subscript +++ b/Completion/Zsh/Context/_subscript @@ -1,6 +1,6 @@ #compdef -subscript- -local expl ind osuf=']' flags +local expl ind osuf=']' flags sep if [[ "$1" = -q ]]; then osuf='] ' @@ -91,7 +91,8 @@ elif [[ ${(Pt)${compstate[parameter]}} = array* ]]; then list=( "$list[@]" '' ) fi done - zformat -a list ' -- ' "$list[@]" + zstyle -s ":completion:${curcontext}:indexes" list-separator sep || sep=-- + zformat -a list " $sep " "$list[@]" disp=( -d list) else disp=() -- cgit 1.4.1