summary refs log tree commit diff
path: root/Completion/Zsh
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2001-07-25 12:18:23 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2001-07-25 12:18:23 +0000
commitc83d16f8ee5721de1da3e8449c30a31ca1372d28 (patch)
treeaf5c704f6d02ad081058ff0428abedbe180dbabf /Completion/Zsh
parente1708022d206dfe183bbce3d03c7e5e02abc3a59 (diff)
downloadzsh-c83d16f8ee5721de1da3e8449c30a31ca1372d28.tar.gz
zsh-c83d16f8ee5721de1da3e8449c30a31ca1372d28.tar.xz
zsh-c83d16f8ee5721de1da3e8449c30a31ca1372d28.zip
another fix for 15477 (separator strings); add list-separator style (15484)
Diffstat (limited to 'Completion/Zsh')
-rw-r--r--Completion/Zsh/Command/_zstyle5
-rw-r--r--Completion/Zsh/Context/_subscript5
2 files changed, 8 insertions, 2 deletions
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=()