diff options
author | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2018-09-21 16:29:07 +0100 |
---|---|---|
committer | Peter Stephenson <p.w.stephenson@ntlworld.com> | 2018-09-21 16:29:07 +0100 |
commit | e76ea18477b044cd24deb4ee7bdd5bb8f0a6d47e (patch) | |
tree | d9bd3788e367d37cdb25ae3ab3b9ef74c5c06a22 | |
parent | 624219e0e4cbfdfb286e707bd2853f2d7b6a4a7d (diff) | |
download | zsh-e76ea18477b044cd24deb4ee7bdd5bb8f0a6d47e.tar.gz zsh-e76ea18477b044cd24deb4ee7bdd5bb8f0a6d47e.tar.xz zsh-e76ea18477b044cd24deb4ee7bdd5bb8f0a6d47e.zip |
43511: Initialiase alias entry on input stack.
This didn't happen if neither history nor alias expansion was in use.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Src/input.c | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog index 87d6e9c3e..9c94f2d57 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2018-09-21 Peter Stephenson <p.w.stephenson@ntlworld.com> + + * 43511: Src/input.c: alias entry on input stack wasn't + initialised if not expanding alias or using history. + 2018-09-19 Maximilian Bosch <maximilian@mbosch.me> * 43502: Completion/X/Command/_setxkbmap: Search XDG_DATA_DIRS diff --git a/Src/input.c b/Src/input.c index 9787dedf6..e9989ffe4 100644 --- a/Src/input.c +++ b/Src/input.c @@ -555,6 +555,7 @@ inpush(char *str, int flags, Alias inalias) if ((instacktop->alias = inalias)) inalias->inuse = 1; } else { + instacktop->alias = NULL; /* If we are continuing an alias expansion, record the alias * expansion in new set of flags (do we need this?) */ @@ -691,6 +692,7 @@ char *input_hasalias(void) { if (!(flags & INP_CONT)) break; + DPUTS(instackptr == instack, "BUG: continuation at bottom of instack"); instackptr--; if (instackptr->alias) return instackptr->alias->node.nam; |