Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Bug: magic-space and expand-history delete part of line since 5.0.8



Since zsh 5.0.8, using magic-space or expand-history can delete part of the
command line for no apparent reason. This does not occur in 5.0.7 or 5.0.5.

To reproduce:

    $ zsh -f
    $ bindkey ' ' magic-space

type this:

    $ vim =(ls) -c 'foo'

move the cursor between 's)' and type '|' then space, and it changes to this:

    $ vim =(ls| )

"-c 'foo'" has been deleted. Many times now I'll edit a command and the whole
right half will just disappear. The same problem happens when using
expand-history.

I git bisected this down to a single commit:
    https://github.com/zsh-users/zsh/commit/c0d01a6fe0c67911650730cf13a2b9a0db16e59b

The commit info/message:

>     commit c0d01a6fe0c67911650730cf13a2b9a0db16e59b
>     Author: Peter Stephenson <pws@xxxxxxx>
>     Date:   Tue Jan 6 17:05:17 2015 +0000
>
>         Fix command substitutions to parse contents as they are read in.
>
>         Do this by refactoring misnamed lexsave()/lexrestore() to allow
>         continuity of history and input.
>
>         Add test.

-Jacob Niehus



Messages sorted by: Reverse Date, Date, Thread, Author