about summary refs log tree commit diff
path: root/Completion/X/_x_font
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/X/_x_font')
-rw-r--r--Completion/X/_x_font15
1 files changed, 14 insertions, 1 deletions
diff --git a/Completion/X/_x_font b/Completion/X/_x_font
index e0acb4014..43a713b34 100644
--- a/Completion/X/_x_font
+++ b/Completion/X/_x_font
@@ -1,3 +1,16 @@
 #autoload
 
-_message 'font'
+local expl
+
+_wanted fonts || return 1
+
+# This *has* to be improved some day...
+
+if (( ! $+_font_cache )); then
+  typeset -gU _font_cache
+
+ _font_cache=( "${(@)^${(@f)$(_call fonts xlsfonts)}%%--*}--" )
+fi
+
+_all_labels fonts expl font \
+    compadd -M 'r:|-=* r:|=*' "$@" -S '' - "$_font_cache[@]"