1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-11-20 14:04:03 +01:00
zsh/Completion/X/_x_keysym

23 lines
613 B
Plaintext
Raw Normal View History

1999-09-23 15:09:12 +02:00
#autoload
local expl
_tags keysyms || return 1
2000-04-01 22:43:43 +02:00
1999-09-23 15:09:12 +02:00
if (( ! $+_keysym_cache )); then
local file
file=( /usr/{include,{{X11R6,openwin},local{,/X11{,R6}}}/include}/X11/keysymdef.h(N) )
if (( $#file )); then
_keysym_cache=( "${(@)${(@)${(M@)${(@f)$(< $file[1])}:#\#define[ ]##XK_*}#\#define[ ]##XK_}%%[ ]*}" )
else
_keysym_cache=( BackSpace Tab Linefeed Clear Return Pause Escape
Delete Left Right Up Down Space Home Begin End
F{1,2,3,4,5,6,7,8,9,10,11,12} )
fi
fi
_wanted keysyms expl 'key symbol' \
2000-04-01 22:43:43 +02:00
compadd "$@" -M 'm:{a-z}={A-Z} r:|-=* r:|=*' - $_keysym_cache