diff options
| author | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2016-09-07 18:51:01 +0100 |
|---|---|---|
| committer | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2016-09-07 18:51:01 +0100 |
| commit | ef862262e72c51621aa4d9400a2395fdc4f2324f (patch) | |
| tree | 472699c2eb2e78e6e96899628243ee006d1135eb | |
| parent | 39221: update rm completion for BSD (diff) | |
| download | zsh-ef862262e72c51621aa4d9400a2395fdc4f2324f.tar zsh-ef862262e72c51621aa4d9400a2395fdc4f2324f.tar.gz zsh-ef862262e72c51621aa4d9400a2395fdc4f2324f.tar.bz2 zsh-ef862262e72c51621aa4d9400a2395fdc4f2324f.tar.lz zsh-ef862262e72c51621aa4d9400a2395fdc4f2324f.tar.xz zsh-ef862262e72c51621aa4d9400a2395fdc4f2324f.tar.zst zsh-ef862262e72c51621aa4d9400a2395fdc4f2324f.zip | |
39185: Only set word begin for completion word if not alias.
This is consistent with other ZLE code in lex.c and fixes a crash
in some completions involving aliases, e.g. if uncompleted quotes.
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | Src/lex.c | 2 |
2 files changed, 6 insertions, 1 deletions
@@ -1,3 +1,8 @@ +2016-09-07 Peter Stephenson <p.w.stephenson@ntlworld.com> + + * 39185: Src/lex.c: wordbeg only set for ZLE if not alias. + Fixes crash on completion in some obscure alias expansions. + 2016-09-07 Peter Stephenson <p.stephenson@samsung.com> * Matthew Martin: 39221: Completion/Unix/Command/_rm: update for @@ -613,7 +613,7 @@ gettok(void) if (lexstop) return (errflag) ? LEXERR : ENDINPUT; isfirstln = 0; - if ((lexflags & LEXFLAGS_ZLE)) + if ((lexflags & LEXFLAGS_ZLE) && !(inbufflags & INP_ALIAS)) wordbeg = inbufct - (qbang && c == bangchar); hwbegin(-1-(qbang && c == bangchar)); /* word includes the last character read and possibly \ before ! */ |
