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

Re: Bug#190948: Violation against The Single UNIX ? Specification, Version 2

Peter Stephenson wrote:
>Exactly, it's completely meaningless in zsh.  It is ridiculous for the
>standard to specify how the shell handles line editing,

Yet the standard does.  A vi command line editing mode is defined
by POSIX.  An Emacs mode would also have been in the standard, but the
committee couldn't reach agreement on the details.  (ISTR seeing RMS
named in the credits, I wonder what really went on.)  I think Zle's vi
mode behaviour is incompatible with POSIX on some points, but I really
don't care, because we did better there.

I think we should, at least, arrange that "set -o vi" in an interactive
zsh with zle loaded has the effect of "bindkey -v".  That perserves
the intent of the standard -- that "set -o vi" is the portable way for
a user to select vi-style command line editing -- and we don't have to
go ridiculously out of our way to achieve it.

I suggest having a hook to execute on "set -o vi"; Zle would hook this
when it is loaded, just like the other things it already hooks.  To be
nice to everyone that knows that, despite POSIX, interactive shells do
actually have an Emacs mode too, it would be good to hook "set -o emacs"
as well.  Only these two are required.


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