From 85e7a6af99b5c83754949ea3a89b493e7ed95c27 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Wed, 25 Aug 1999 14:38:31 +0000 Subject: zsh-workers/7480 --- Completion/Core/_multi_parts | 2 ++ Completion/User/_xterm | 4 ++-- Completion/X/_x_font | 13 ++++++++++++- Completion/X/_xt_arguments | 1 - 4 files changed, 16 insertions(+), 4 deletions(-) (limited to 'Completion') diff --git a/Completion/Core/_multi_parts b/Completion/Core/_multi_parts index 392277f94..d51130391 100644 --- a/Completion/Core/_multi_parts +++ b/Completion/Core/_multi_parts @@ -84,6 +84,8 @@ while true; do # No exact match, see how many strings match what's on the line. compadd -O tmp1 - "${(@)matches%%${sep}*}" + tmp2=( "$tmp1[@]" ) + tmp1=( "$tmp2[@]" ) if [[ $#tmp1 -eq 1 ]]; then diff --git a/Completion/User/_xterm b/Completion/User/_xterm index 460921193..379e5a46d 100644 --- a/Completion/User/_xterm +++ b/Completion/User/_xterm @@ -20,8 +20,8 @@ _xt_arguments \ '-cu' '+cu' \ '-dc' '+dc' \ '-e:program: _command_names -e:*::program arguments: _normal' \ - '-fb:bold font:' \ - '-fi:icon font:' \ + '-fb:bold font:_x_font' \ + '-fi:icon font:_x_font' \ '-hc:background color for highlighted text:_colors' \ '-hf' '+hf' \ '-ie' '+ie' \ diff --git a/Completion/X/_x_font b/Completion/X/_x_font index e0acb4014..d4f16f33c 100644 --- a/Completion/X/_x_font +++ b/Completion/X/_x_font @@ -1,3 +1,14 @@ #autoload -_message 'font' +local expl + +# This *has* to be improved some day... + +if (( ! $+_font_cache )); then + typeset -U _font_cache + + _font_cache=( "${(@)^${(@f)$(xlsfonts)}%%--*}--" ) +fi + +_description expl font +compgen -M 'r:|-=* r:|=*' "$expl[@]" "$@" -S '' -k _font_cache diff --git a/Completion/X/_xt_arguments b/Completion/X/_xt_arguments index 02f11e226..6324c27e0 100644 --- a/Completion/X/_xt_arguments +++ b/Completion/X/_xt_arguments @@ -24,7 +24,6 @@ _arguments \ '+rv' '-rv' '-reverse' \ '+synchronous' '-synchronous' \ '-background:background color:_colors' \ - '-background:background color:_colors' \ '-bd:border color:_colors' \ '-bg:background color:_colors' \ '-bordercolor:border color:_colors' \ -- cgit 1.4.1