1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-10 10:21:23 +02:00
zsh/Completion/Base/Utility/_guard

17 lines
266 B
Text

#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" ]]