about summary refs log tree commit diff
path: root/Completion/X
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2001-04-02 12:08:52 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2001-04-02 12:08:52 +0000
commit40d7552724dfceed337e542eaa5f2cca875a6d08 (patch)
tree213be555fc84ef8b253f592888a9f1b1f5e76374 /Completion/X
parentd0b3915846fee333b69095923c684a770ab4b4dd (diff)
downloadzsh-40d7552724dfceed337e542eaa5f2cca875a6d08.tar.gz
zsh-40d7552724dfceed337e542eaa5f2cca875a6d08.tar.xz
zsh-40d7552724dfceed337e542eaa5f2cca875a6d08.zip
moved from Completion/X/_x_colormapid
Diffstat (limited to 'Completion/X')
-rw-r--r--Completion/X/Type/_x_colormapid16
1 files changed, 16 insertions, 0 deletions
diff --git a/Completion/X/Type/_x_colormapid b/Completion/X/Type/_x_colormapid
new file mode 100644
index 000000000..61b0a72f1
--- /dev/null
+++ b/Completion/X/Type/_x_colormapid
@@ -0,0 +1,16 @@
+#autoload
+
+local expl list desc
+
+_tags 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
+
+_wanted colormapids expl 'colormap id' \
+    compadd "$@" "$desc[@]" - "${(@)list%% *}"