summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--Completion/X/Type/_x_font16
1 files changed, 16 insertions, 0 deletions
diff --git a/Completion/X/Type/_x_font b/Completion/X/Type/_x_font
new file mode 100644
index 000000000..6208faaca
--- /dev/null
+++ b/Completion/X/Type/_x_font
@@ -0,0 +1,16 @@
+#autoload
+
+local expl
+
+_tags fonts || return 1
+
+# This *has* to be improved some day...
+
+if (( ! $+_font_cache )); then
+  typeset -gU _font_cache
+
+ _font_cache=( "${(@)^${(@f)$(_call_program fonts xlsfonts)}%%--*}--" )
+fi
+
+_wanted fonts expl font \
+    compadd -M 'r:|-=* r:|=*' "$@" -S '' -a _font_cache