about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
Diffstat (limited to 'Completion')
-rw-r--r--Completion/AIX/Command/_lscfg5
-rw-r--r--Completion/AIX/Type/_logical_volumes7
-rw-r--r--Completion/Base/Utility/_describe6
-rw-r--r--Completion/Unix/Type/_printers8
-rw-r--r--Completion/Zsh/Command/_zstyle5
-rw-r--r--Completion/Zsh/Context/_subscript5
6 files changed, 23 insertions, 13 deletions
diff --git a/Completion/AIX/Command/_lscfg b/Completion/AIX/Command/_lscfg
index 4667a0bd7..f9e8f15cd 100644
--- a/Completion/AIX/Command/_lscfg
+++ b/Completion/AIX/Command/_lscfg
@@ -1,6 +1,6 @@
 #compdef lscfg
 
-local state line expl curcontext="$curcontext" disp list devs
+local state line expl curcontext="$curcontext" disp list devs sep
 
 _arguments -C -s \
   '-l[display device information for named device]:device:->device' \
@@ -9,7 +9,8 @@ _arguments -C -s \
 if [[ "$state" = device ]]; then
   devs=( ${${${${(f)"$(lscfg)"}[6,-1]:# *}##??}/ ##[^ ]# #/:} )
   if zstyle -T ":completion:${curcontext}:devices" verbose; then
-    zformat -a list ' -- ' "$devs[@]"
+    zstyle -s ":completion:${curcontext}:devices" list-separator sep || sep=--
+    zformat -a list " $sep " "$devs[@]"
     disp=(-ld list)
   else
     disp=()
diff --git a/Completion/AIX/Type/_logical_volumes b/Completion/AIX/Type/_logical_volumes
index 53949fab2..1dd351360 100644
--- a/Completion/AIX/Type/_logical_volumes
+++ b/Completion/AIX/Type/_logical_volumes
@@ -1,11 +1,12 @@
 #autoload
 
-local expl list names disp
+local expl list names disp sep
 
 list=( $(lsvg -l $(lsvg)|sed  -e '2d'|awk '/[^:]* / {if ( $7 != "N/A" ) print $1 ":" $7; else print $1}' ) )
 names=(${list%%:*})
-if zstyle -T ":completion:${curcontext}" verbose; then
-  zformat -a list ' -- ' $list
+if zstyle -T ":completion:${curcontext}:" verbose; then
+  zstyle -s ":completion:${curcontext}:" list-separator sep || sep=--
+  zformat -a list " $sep " $list
   disp=(-d list)
 else
   disp=()
diff --git a/Completion/Base/Utility/_describe b/Completion/Base/Utility/_describe
index 2783c25d1..bed75a318 100644
--- a/Completion/Base/Utility/_describe
+++ b/Completion/Base/Utility/_describe
@@ -23,12 +23,13 @@ fi
 
 zstyle -T ":completion:${curcontext}:$_type" verbose && _showd=yes
 
+zstyle -s ":completion:${curcontext}:$_type" list-separator _sep || _sep=--
+
 if zstyle -T ":completion:${curcontext}:$_type" list-grouped; then
   local _argv _new _strs _mats _opts _i=2
 
   _argv=( "$@" )
   _grp=(-g)
-  _sep='-- '
   _new=( "$1" )
   shift
 
@@ -68,7 +69,6 @@ if zstyle -T ":completion:${curcontext}:$_type" list-grouped; then
   set - "$_argv[@]"
 else
   _grp=()
-  _sep=' -- '
 fi
 
 _descr="$1"
@@ -83,7 +83,7 @@ while _tags; do
   while _next_label "$_type" _expl "$_descr"; do
 
     if [[ -n "$_showd" ]]; then
-      compdescribe -I "$_hide" "$_sep" _expl "$_grp[@]" "$@"
+      compdescribe -I "$_hide" "$_sep " _expl "$_grp[@]" "$@"
     else
       compdescribe -i "$_hide" "$@"
     fi
diff --git a/Completion/Unix/Type/_printers b/Completion/Unix/Type/_printers
index 1b42de5cb..03f950c9c 100644
--- a/Completion/Unix/Type/_printers
+++ b/Completion/Unix/Type/_printers
@@ -1,6 +1,6 @@
 #autoload
 
-local expl ret=1 list disp
+local expl ret=1 list disp sep
 
 if (( $+commands[lsallq] )); then
   # Use AIX's command to list print queues
@@ -8,6 +8,8 @@ if (( $+commands[lsallq] )); then
   return
 fi
 
+zstyle -s ":completion:${curcontext}:printers" list-separator sep || sep=--
+
 if (( ! $+_lp_cache )); then
   local file entry names i
 
@@ -42,7 +44,7 @@ if (( ! $+_lp_cache )); then
 fi
 
 if zstyle -T ":completion:${curcontext}:printers" verbose; then
-  zformat -a list ' -- ' "$_lp_cache[@]"
+  zformat -a list " $sep " "$_lp_cache[@]"
   disp=(-ld list)
 else
   disp=()
@@ -53,7 +55,7 @@ _wanted printers expl printer \
 (( $+_lp_alias_cache )) || return 1
 
 if zstyle -T ":completion:${curcontext}:printers" verbose; then
-  zformat -a list ' -- ' "$_lp_alias_cache[@]"
+  zformat -a list " $sep " "$_lp_alias_cache[@]"
   disp=(-ld list)
 else
   disp=()
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=()