1999-09-21 03:34:56 +02:00
|
|
|
#autoload
|
|
|
|
|
|
|
|
local list expl
|
|
|
|
|
2000-04-11 09:57:56 +02:00
|
|
|
_tags windows || return 1
|
2000-04-01 22:43:43 +02:00
|
|
|
|
|
|
|
list=( "${(@)${(M@)${(@f)$(_call windows xwininfo -root -tree)}:#[ ]#0x[0-9a-f]# \"*}##[ ]#}" )
|
1999-09-21 03:34:56 +02:00
|
|
|
|
|
|
|
if [[ "$1" = -n ]]; then
|
|
|
|
shift
|
|
|
|
|
2000-04-11 09:57:56 +02:00
|
|
|
_wanted windows expl 'window name' \
|
2000-04-01 22:43:43 +02:00
|
|
|
compadd "$@" -d list - "${(@)${(@)list#*\"}%%\"*}"
|
1999-09-21 03:34:56 +02:00
|
|
|
else
|
|
|
|
[[ "$1" = - ]] && shift
|
|
|
|
|
2000-04-11 09:57:56 +02:00
|
|
|
_wanted windows expl 'window ID' compadd "$@" -d list - "${(@)list%% *}"
|
1999-09-21 03:34:56 +02:00
|
|
|
fi
|