about summary refs log tree commit diff
path: root/Completion/X/Type
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2001-04-02 12:09:08 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2001-04-02 12:09:08 +0000
commit427d15cb517924fd8c52a14f1ba45c53799b89f8 (patch)
tree287f30e9a28513b4e88dd283ded418147e43ccac /Completion/X/Type
parent89810acc8f4343802e35c0910df9822b44b524b1 (diff)
downloadzsh-427d15cb517924fd8c52a14f1ba45c53799b89f8.tar.gz
zsh-427d15cb517924fd8c52a14f1ba45c53799b89f8.tar.xz
zsh-427d15cb517924fd8c52a14f1ba45c53799b89f8.zip
moved from Completion/X/_x_cursor
Diffstat (limited to 'Completion/X/Type')
-rw-r--r--Completion/X/Type/_x_cursor18
1 files changed, 18 insertions, 0 deletions
diff --git a/Completion/X/Type/_x_cursor b/Completion/X/Type/_x_cursor
new file mode 100644
index 000000000..5346710d7
--- /dev/null
+++ b/Completion/X/Type/_x_cursor
@@ -0,0 +1,18 @@
+#autoload
+
+local expl
+
+if (( ! $+_cursor_cache )); then
+  local file
+
+  file=( /usr/{include,{{X11R6,openwin},local{,/X11{,R6}}}/include}/X11/cursorfont.h(N) )
+
+  if (( $#file )); then
+    _cursor_cache=( "${(@)${(@)${(M@)${(@f)$(< $file[1])}:#*XC_*}[2,-1]#* XC_}% *}" )
+  else
+    _cursor_cache=( X_cursor )
+  fi
+fi
+
+_wanted cursors expl 'cursor name' \
+    compadd "$@" -M 'm:-=_ r:|_=*' -a _cursor_cache