diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | Src/Zle/complete.c | 9 |
2 files changed, 9 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog index 99b779252..03747ead0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2015-07-02 Peter Stephenson <p.stephenson@samsung.com> + * Han Pingtian: 35665: Src/Zle/complete.c: better error handling + for command line match processing. + * Eric Cook: 35663: Completion/Unix/Command/_zpool: fix for changed interface. diff --git a/Src/Zle/complete.c b/Src/Zle/complete.c index 63e5b9184..471c9f491 100644 --- a/Src/Zle/complete.c +++ b/Src/Zle/complete.c @@ -268,7 +268,10 @@ parse_cmatcher(char *name, char *s) if (!*s || !*++s) { if (name) - zwarnnam(name, "missing line pattern"); + if (both) + zwarnnam(name, "missing right anchor"); + else + zwarnnam(name, "missing line pattern"); return pcm_err; } } else @@ -288,6 +291,7 @@ parse_cmatcher(char *name, char *s) if ((fl & CMF_RIGHT) && !fl2 && (!*s || !*++s)) { if (name) zwarnnam(name, "missing right anchor"); + return pcm_err; } else if (!(fl & CMF_RIGHT) || fl2) { if (!*s) { if (name) @@ -313,8 +317,7 @@ parse_cmatcher(char *name, char *s) return pcm_err; } s++; - } else - right = NULL; + } if (*s == '*') { if (!(fl & (CMF_LEFT | CMF_RIGHT))) { |