diff options
Diffstat (limited to 'Completion/X/_x_window')
-rw-r--r-- | Completion/X/_x_window | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Completion/X/_x_window b/Completion/X/_x_window index a79f7fd62..2ca31e1bd 100644 --- a/Completion/X/_x_window +++ b/Completion/X/_x_window @@ -2,18 +2,17 @@ local list expl -_tags windows || return 1 +_wanted windows || return 1 list=( "${(@)${(M@)${(@f)$(_call windows xwininfo -root -tree)}:#[ ]#0x[0-9a-f]# \"*}##[ ]#}" ) if [[ "$1" = -n ]]; then shift - _description windows expl 'window name' - compadd "$@" "$expl[@]" -d list - "${(@)${(@)list#*\"}%%\"*}" + _loop windows expl 'window name' \ + compadd "$@" -d list - "${(@)${(@)list#*\"}%%\"*}" else [[ "$1" = - ]] && shift - _description windows expl 'window ID' - compadd "$@" "$expl[@]" -d list - "${(@)list%% *}" + _loop windows expl 'window ID' compadd "$@" -d list - "${(@)list%% *}" fi |