mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-01 05:16:05 +01:00
Initial revision
This commit is contained in:
parent
8d1b4b1358
commit
6a87f76a27
2 changed files with 30 additions and 0 deletions
15
Completion/User/_cursors
Normal file
15
Completion/User/_cursors
Normal file
|
@ -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[@]"
|
15
Completion/User/_xsetroot
Normal file
15
Completion/User/_xsetroot
Normal file
|
@ -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
|
Loading…
Reference in a new issue