diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Completion/Unix/Command/_lzop | 13 | ||||
-rw-r--r-- | Completion/Zsh/Type/_directory_stack | 8 | ||||
-rw-r--r-- | Completion/Zsh/Type/_file_descriptors | 12 | ||||
-rw-r--r-- | Completion/Zsh/Type/_jobs | 5 |
5 files changed, 27 insertions, 16 deletions
diff --git a/ChangeLog b/ChangeLog index f138b1e66..44f16c151 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2001-07-25 Sven Wischnowsky <wischnow@zsh.org> + * 15485: Completion/Unix/Command/_lzop, + Completion/Zsh/Type/_directory_stack, + Completion/Zsh/Type/_file_descriptors, Completion/Zsh/Type/_jobs: + some more places where list-separator should be used + * 15484: Completion/AIX/Command/_lscfg, Completion/AIX/Type/_logical_volumes, Completion/Base/Utility/_describe, diff --git a/Completion/Unix/Command/_lzop b/Completion/Unix/Command/_lzop index fa8d46c58..bb918fd30 100644 --- a/Completion/Unix/Command/_lzop +++ b/Completion/Unix/Command/_lzop @@ -1,6 +1,6 @@ #compdef lzop -local expl state line decompress disp curcontext="$curcontext" +local expl state line decompress disp curcontext="$curcontext" sep typeset -A opt_args _arguments -C -s \ @@ -91,12 +91,13 @@ case "$state" in fi ;; flags) + zstyle -s ":completion:${curcontext}:flags" list-separator sep || sep=-- disp=( \ - "F -- Append a \`*' for executable files" \ - "G -- Inhibit display of group information" \ - "Q -- Enclose file names in double quotes" ) - disp=( ${disp[@]%[Z$PREFIX] -*} ) + "F $sep Append a \`*' for executable files" \ + "G $sep Inhibit display of group information" \ + "Q $sep Enclose file names in double quotes" ) + disp=( ${disp[@]:#[Z$PREFIX]*} ) compset -P '[FGQ]*' - compadd -d disp - ${disp[@]% -*} + compadd -d disp - ${disp[@]%% *} ;; esac 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 |