about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2001-04-02 11:03:34 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2001-04-02 11:03:34 +0000
commitb8fd517172b74e625fb6f9d9f0376e776bb0b429 (patch)
tree6ab0f3d75d2db0cd027c587731b390f654a29663 /Completion
parent5962d9ffdb0ebd57987b61f41fe4cdfbef55c777 (diff)
downloadzsh-b8fd517172b74e625fb6f9d9f0376e776bb0b429.tar.gz
zsh-b8fd517172b74e625fb6f9d9f0376e776bb0b429.tar.xz
zsh-b8fd517172b74e625fb6f9d9f0376e776bb0b429.zip
moved from Completion/Core/_message
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Base/Core/_message20
1 files changed, 20 insertions, 0 deletions
diff --git a/Completion/Base/Core/_message b/Completion/Base/Core/_message
new file mode 100644
index 000000000..cd08d5fb0
--- /dev/null
+++ b/Completion/Base/Core/_message
@@ -0,0 +1,20 @@
+#autoload
+
+local format raw
+
+_tags messages || return 1
+
+if [[ "$1" = -r ]]; then
+  raw=yes
+  shift
+  format="$1"
+else
+  zstyle -s ":completion:${curcontext}:messages" format format ||
+      zstyle -s ":completion:${curcontext}:descriptions" format format
+fi
+
+if [[ -n "$format$raw" ]]; then
+  [[ -z "$raw" ]] && zformat -f format "$format" "d:$1" "${(@)argv[2,-1]}"
+  builtin compadd -x "$format"
+  _comp_mesg=yes
+fi