From 4a662b72f11398d648ea65644cd6416176d7241d Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Tue, 21 Sep 1999 01:34:56 +0000 Subject: Initial revision --- Completion/X/_x_window | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Completion/X/_x_window (limited to 'Completion/X/_x_window') diff --git a/Completion/X/_x_window b/Completion/X/_x_window new file mode 100644 index 000000000..118c7f131 --- /dev/null +++ b/Completion/X/_x_window @@ -0,0 +1,19 @@ +#autoload + +setopt localoptions extendedglob + +local list expl + +list=( "${(@)${(M@)${(@f)$(xwininfo -root -tree)}:#[ ]#0x[0-9a-f]# \"*}##[ ]#}" ) + +if [[ "$1" = -n ]]; then + shift + + _description expl 'window name' + compadd "$@" "$expl[@]" -d list - "${(@)${(@)list#*\"}%%\"*}" +else + [[ "$1" = - ]] && shift + + _description expl 'window ID' + compadd "$@" "$expl[@]" -d list - "${(@)list%% *}" +fi -- cgit 1.4.1