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

bug in vared with command history



(I sent this a few weeks ago and about a week later got a bounce
saying it was undeliverable so I am trying it again.  Please copy me
in any replies.)



In zsh 3.1.5,

% foo=bar
% fc -R <(echo one ; echo two) ; vared -h -p "> " foo

The inital contents is "bar".
Hit up-arrow once and you have "one", not "two".
Once the command completes, you can see that "two" has 
made it into the history.

I assume it is preventing you from getting at the last
command because that's usually the one you're executing.
But I'd like to be able to do something like:

    while cmd="" && vared -h -p "> " cmd ; do
      # process $cmd
      fc -R <(echo "$cmd")
    done

which works great except that I can never get to the very 
last command in the history.

thanks,
Greg



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