about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Core/_multi_parts2
-rw-r--r--Completion/User/_xterm4
-rw-r--r--Completion/X/_x_font13
-rw-r--r--Completion/X/_xt_arguments1
4 files changed, 16 insertions, 4 deletions
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' \