about summary refs log tree commit diff
path: root/Completion/X/_x_colormapid
blob: 3c637c1d96357452e761fe9b54d1ffa61fbb4c84 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#autoload

local expl list desc

_wanted colormapids || return 1

list=(${(f)"$(xprop -root -f RGB_COLOR_MAP 32xcccccccxx ': $0\n'|awk -F'[ ():]' '/^[a-zA-Z_]+\(RGB_COLOR_MAP\)/ {print $5, "--", $1}')"})

if zstyle -T ":completion:${curcontext}:colormap-id" verbose; then
  desc=(-ld list)
else
  desc=()
fi

_all_labels colormapids expl 'colormap id' \
    compadd "$@" "$desc[@]" - "${(@)list%% *}"