From 20fb9ff3e49fc7f48fb6ca0179010b61c1eb34fd Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Mon, 2 Apr 2001 12:12:35 +0000 Subject: [PATCH] moved from Completion/X/_x_window --- Completion/X/Type/_x_window | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Completion/X/Type/_x_window 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