diff options
author | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2001-04-02 12:12:35 +0000 |
---|---|---|
committer | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2001-04-02 12:12:35 +0000 |
commit | 20fb9ff3e49fc7f48fb6ca0179010b61c1eb34fd (patch) | |
tree | 2e4ef9cef0785598f6d9d77fc5a7b8cfee9aa687 /Completion | |
parent | e6ee80809dafeaf9e24ae0b4f794b55feab0adf0 (diff) | |
download | zsh-20fb9ff3e49fc7f48fb6ca0179010b61c1eb34fd.tar.gz zsh-20fb9ff3e49fc7f48fb6ca0179010b61c1eb34fd.tar.xz zsh-20fb9ff3e49fc7f48fb6ca0179010b61c1eb34fd.zip |
moved from Completion/X/_x_window
Diffstat (limited to 'Completion')
-rw-r--r-- | Completion/X/Type/_x_window | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Completion/X/Type/_x_window b/Completion/X/Type/_x_window new file mode 100644 index 000000000..15bb87fcf --- /dev/null +++ b/Completion/X/Type/_x_window @@ -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 |