diff options
Diffstat (limited to 'Completion/Base')
-rw-r--r-- | Completion/Base/Core/_message | 10 | ||||
-rw-r--r-- | Completion/Base/Utility/_guard | 13 |
2 files changed, 12 insertions, 11 deletions
diff --git a/Completion/Base/Core/_message b/Completion/Base/Core/_message index 979dfa097..2ad778082 100644 --- a/Completion/Base/Core/_message +++ b/Completion/Base/Core/_message @@ -3,11 +3,17 @@ local format raw gopt if [[ "$1" = -e ]]; then - local expl ret=1 + local expl ret=1 tag _comp_mesg=yes - _tags "$2" && while _next_label "$2" expl "$3"; do + if (( $# > 2 )); then + tag="$2" + shift + else + tag="$curtag" + fi + _tags "$tag" && while _next_label "$tag" expl "$2"; do compadd ${expl:/-X/-x} ret=0 done diff --git a/Completion/Base/Utility/_guard b/Completion/Base/Utility/_guard index 4c07fe1b9..ff62981ce 100644 --- a/Completion/Base/Utility/_guard +++ b/Completion/Base/Utility/_guard @@ -1,17 +1,12 @@ #autoload -local mesg pat garbage +local garbage -mesg=() -zparseopts -K -D -a garbage M: J: V: 1 2 n F: X:=mesg +zparseopts -K -D -a garbage M: J: V: 1 2 n F: X: [[ "$PREFIX$SUFFIX" != $~1 ]] && return 1 -if [[ $# -gt 1 || $#mesg -eq 0 ]]; then - shift - _message "$*" -else - _message -r "$mesg[2]" -fi +shift +_message -e "$*" [[ -n "$PREFIX$SUFFIX" ]] |