From 6a87f76a27a25bc5a25dc0fb00eebed7f10788fa Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Fri, 13 Aug 1999 12:34:21 +0000 Subject: Initial revision --- Completion/User/_cursors | 15 +++++++++++++++ Completion/User/_xsetroot | 15 +++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 Completion/User/_cursors create mode 100644 Completion/User/_xsetroot (limited to 'Completion') diff --git a/Completion/User/_cursors b/Completion/User/_cursors new file mode 100644 index 000000000..7e5cbc44e --- /dev/null +++ b/Completion/User/_cursors @@ -0,0 +1,15 @@ +#autoload + +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 + +compadd -M 'm:-=_ r:|_=*' - "$_cursor_cache[@]" diff --git a/Completion/User/_xsetroot b/Completion/User/_xsetroot new file mode 100644 index 000000000..74a0b6180 --- /dev/null +++ b/Completion/User/_xsetroot @@ -0,0 +1,15 @@ +#compdef xsetroot + +case "$words[CURRENT-1]" in +-cursor) _files -/g '*.(#i)(xbm|curs(|or))'; return;; +-cursor_name) _cursors; return;; +-bitmap) _files -/g '*.(#i)xbm'; return;; +-([fb]g|solid)) _colors; return;; +esac + +if [[ CURRENT -gt 2 && "$words[CURRENT-2]" = -cursor ]]; then + _files -/g '*.(#i)(xbm|curs(|or)|mask)' +else + compadd -M 'm:-=_ r:|_=*' - -help -def -cursor -cursor_name -bitmap -mod -gray -grey \ + -fg -bg -rv -solid -name +fi -- cgit 1.4.1