mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-11-19 13:33:52 +01:00
34 lines
596 B
Plaintext
34 lines
596 B
Plaintext
#autoload
|
|
|
|
local format raw
|
|
|
|
if [[ "$1" = -e ]]; then
|
|
local expl ret=1
|
|
|
|
_comp_mesg=yes
|
|
|
|
_tags "$2" && while _next_label "$2" expl "$3"; do
|
|
compadd ${expl:/-X/-x}
|
|
ret=0
|
|
done
|
|
|
|
return ret
|
|
fi
|
|
|
|
_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
|