mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-02-24 11:51:19 +01:00
moved from Completion/X/_x_window
This commit is contained in:
parent
e6ee80809d
commit
20fb9ff3e4
1 changed files with 18 additions and 0 deletions
18
Completion/X/Type/_x_window
Normal file
18
Completion/X/Type/_x_window
Normal file
|
@ -0,0 +1,18 @@
|
|||
#autoload
|
||||
|
||||
local list expl
|
||||
|
||||
_tags windows || return 1
|
||||
|
||||
list=( "${(@)${(M@)${(@f)$(_call_program windows xwininfo -root -tree)}:#[ ]#0x[0-9a-f]# \"*}##[ ]#}" )
|
||||
|
||||
if [[ "$1" = -n ]]; then
|
||||
shift
|
||||
|
||||
_wanted windows expl 'window name' \
|
||||
compadd "$@" -d list - "${(@)${(@)list#*\"}%%\"*}"
|
||||
else
|
||||
[[ "$1" = - ]] && shift
|
||||
|
||||
_wanted windows expl 'window ID' compadd "$@" -d list - "${(@)list%% *}"
|
||||
fi
|
Loading…
Reference in a new issue