mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-10 10:21:23 +02:00
19 lines
408 B
Text
19 lines
408 B
Text
#autoload
|
|
|
|
local list expl
|
|
|
|
_tags windows || return 1
|
|
|
|
list=( "${(@)${(M@)${(@f)$(xwininfo -root -tree)}:#[ ]#0x[0-9a-f]# \"*}##[ ]#}" )
|
|
|
|
if [[ "$1" = -n ]]; then
|
|
shift
|
|
|
|
_description windows expl 'window name'
|
|
compadd "$@" "$expl[@]" -d list - "${(@)${(@)list#*\"}%%\"*}"
|
|
else
|
|
[[ "$1" = - ]] && shift
|
|
|
|
_description windows expl 'window ID'
|
|
compadd "$@" "$expl[@]" -d list - "${(@)list%% *}"
|
|
fi
|