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:36:34 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2001-07-25 12:36:34 +0000
commit1df4b6620bde483aaf38521f7675547d42b62c42 (patch)
treeb637ff44a0ffa29d78557513be2824928081900b /Completion/Zsh
parentc83d16f8ee5721de1da3e8449c30a31ca1372d28 (diff)
downloadzsh-1df4b6620bde483aaf38521f7675547d42b62c42.tar.gz
zsh-1df4b6620bde483aaf38521f7675547d42b62c42.tar.xz
zsh-1df4b6620bde483aaf38521f7675547d42b62c42.zip
some more places where list-separator should be used (15485)
Diffstat (limited to 'Completion/Zsh')
-rw-r--r--Completion/Zsh/Type/_directory_stack8
-rw-r--r--Completion/Zsh/Type/_file_descriptors12
-rw-r--r--Completion/Zsh/Type/_jobs5
3 files changed, 15 insertions, 10 deletions
diff --git a/Completion/Zsh/Type/_directory_stack b/Completion/Zsh/Type/_directory_stack
index ac9aa9cb4..8a4cf675a 100644
--- a/Completion/Zsh/Type/_directory_stack
+++ b/Completion/Zsh/Type/_directory_stack
@@ -7,11 +7,13 @@
 
 setopt localoptions nonomatch
 
-local expl list lines revlines disp
+local expl list lines revlines disp sep
 
 ### we decided against this, for now...
 #! zstyle -T ":completion:${curcontext}:directory-stack" prefix-needed ||
 
+zstyle -s ":completion:${curcontext}:directory-stack" list-separator sep || sep=--
+
 [[ $PREFIX = [-+]* ]] || return 1
 
 if zstyle -T ":completion:${curcontext}:directory-stack" verbose; then
@@ -24,11 +26,11 @@ if zstyle -T ":completion:${curcontext}:directory-stack" verbose; then
     integer i
     revlines=( $lines )
     for (( i = 1; i <= $#lines; i++ )); do
-      lines[$i]="$((i-1)) -- ${revlines[-$i]##[0-9]#[	 ]#}"
+      lines[$i]="$((i-1)) $sep ${revlines[-$i]##[0-9]#[	 ]#}"
     done
   else
     for (( i = 1; i <= $#lines; i++ )); do
-      lines[$i]="$i -- ${lines[$i]##[0-9]#[	 ]#}"
+      lines[$i]="$i $sep ${lines[$i]##[0-9]#[	 ]#}"
     done
   fi
   # get the array of numbers only
diff --git a/Completion/Zsh/Type/_file_descriptors b/Completion/Zsh/Type/_file_descriptors
index 56f6905c6..3331be82c 100644
--- a/Completion/Zsh/Type/_file_descriptors
+++ b/Completion/Zsh/Type/_file_descriptors
@@ -1,20 +1,22 @@
 #autoload
 
-local i fds expl list link
+local i fds expl list link sep
 
 for i in {0..9}; [[ -e /dev/fd/$i ]] && fds=( ${fds[@]} $i )
 
-if zstyle -T ":completion:${curcontext}" verbose && [[ -e /proc/$$/fd ]]; then
+if zstyle -T ":completion:${curcontext}:" verbose && [[ -e /proc/$$/fd ]]; then
+  zstyle -s ":completion:${curcontext}:" list-separator sep || sep=--
+
   if zmodload -e zsh/stat; then
     for i in "${fds[@]}"; do
       stat +link -A link /proc/$$/fd/$i
-      list=( ${list[@]} "$i -- ${link[1]}" )
+      list=( ${list[@]} "$i $sep ${link[1]}" )
     done
   elif (( $+commands[readlink] )); then
-    for i in "${fds[@]}"; list=( ${list[@]} "$i -- $(readlink /proc/$$/fd/$i)" )
+    for i in "${fds[@]}"; list=( ${list[@]} "$i $sep $(readlink /proc/$$/fd/$i)" )
   else
     for i in "${fds[@]}"; do
-      list=( ${list[@]} "$i -- $(ls -l /proc/$$/fd/$i|sed 's/.*-> //' )" )
+      list=( ${list[@]} "$i $sep $(ls -l /proc/$$/fd/$i|sed 's/.*-> //' )" )
     done
   fi
   _wanted file-descriptors expl 'file descriptors' compadd "$@" -d list -a fds
diff --git a/Completion/Zsh/Type/_jobs b/Completion/Zsh/Type/_jobs
index bc52643ff..bc35c44d4 100644
--- a/Completion/Zsh/Type/_jobs
+++ b/Completion/Zsh/Type/_jobs
@@ -1,6 +1,6 @@
 #autoload
 
-local expl disp jobs job jids pfx='%' desc how expls
+local expl disp jobs job jids pfx='%' desc how expls sep
 
 if [[ "$1" = -t ]]; then
   zstyle -T ":completion:${curcontext}:jobs" prefix-needed &&
@@ -26,9 +26,10 @@ fi
 
 if [[ -n "$desc" ]]; then
   disp=()
+  zstyle -s ":completion:${curcontext}:jobs" list-separator sep || sep=--
   for job in "$jids[@]"; do
     [[ -n "$desc" ]] &&
-        disp=( "$disp[@]" "${pfx}${(r:2:: :)job} -- ${(r:COLUMNS-8:: :)jobtexts[$job]}" )
+        disp=( "$disp[@]" "${pfx}${(r:2:: :)job} $sep ${(r:COLUMNS-8:: :)jobtexts[$job]}" )
   done
 fi