1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-06 09:01:13 +02:00
zsh/Completion/X/_x_extension
1999-11-15 12:01:46 +00:00

17 lines
439 B
Text

#autoload
local expl
_wanted extensions expl 'X extensions' || return 1
(( $+_xe_cache )) || _xe_cache=( "${(@)${(@f)$(xdpyinfo)}[(r)number of extensions:*,-1][2,(r)default screen number:*][1,-2]//[ ]}" )
if [[ "$1" = -a ]]; then
shift
compadd "$@" "$expl[@]" -M 'm:{a-z}={A-Z} r:|-=* r:|=*' - all "$_xe_cache[@]"
else
[[ "$1" = - ]] && shift
compadd "$@" "$expl[@]" -M 'm:{a-z}={A-Z} r:|-=* r:|=*' - "$_xe_cache[@]"
fi