1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-11-19 21:44:11 +01:00
zsh/Completion/Base/Utility/_guard

18 lines
266 B
Plaintext
Raw Normal View History

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