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

RE: Bug#190948: Violation against The Single UNIX R Specification, Version 2



> 
> On 27 Apr, Juhapekka Tolvanen wrote:
> >
> >
> http://www.opengroup.org/onlinepubs/007908799/xcu/chap2.html#tag_001_014_0
> 11
> >
> > juhtolv@heresy:/home/juhtolv % set -o vi
> > set: no such option: vi
> 
> Being an interactive related feature, this isn't so critical but it would
> be better if we can handle this. Adding a special case in bin_set()
> instead of actually adding an option might perhaps be sufficient to
> satisfy the specification. However, on the basis that zle is a separate
> module and may not even be loaded and you can't just call selectkeymap(),
> I have no idea how to get this to work. And which keymap should set +o
> vi select?
> 

========
Allow shell command-line editing using the built-in vi editor. Enabling vi
mode disables any other command-line editing mode provided as an
implementation extension. It need not be possible to set vi mode on for
certain block-mode terminals.
========

So it is extension and optional. We can just recognize option and set a flag
so Zle selects vi keymap when it starts up in shell compatibility mode. If
Zle is not loaded - just do nothing implying that  implementation extension
is not provided :)

What do you mean about set +o vi? It does not look like this form is
required:

set [-abCefmnuvx][-h][-o option][argument...]
set [+abCefmnuvx][+h][-o option][argument...]
set --[argument...]
set -[argument...]

-andrey



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