1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-10-02 00:41:44 +02:00
zsh/Completion/Base/Utility/_guard

18 lines
266 B
Plaintext

#autoload
local mesg pat garbage
mesg=()
zparseopts -K -D -a garbage M: J: V: 1 2 n F: X:=mesg
[[ "$PREFIX$SUFFIX" != $~1 ]] && return 1
if [[ $# -gt 1 || $#mesg -eq 0 ]]; then
shift
_message "$*"
else
_message -r "$mesg[2]"
fi
[[ -n "$PREFIX$SUFFIX" ]]