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

Re: Support for inverting of options?



On 17/09/2007, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Sep 16, 11:17pm, Richard Hartmann wrote:
> }
> } Of course, you will pretty much always know what a specific option
> } is set to (at least if you touch it in your zshrc), but scripting and
> } key-binding gets a lot easier if you use inversion.
>
> I might agree about keybinding, but I'd say scripting gets *sloppier*,
> not easier, with inversion.  Miss one inversion, whether by programming
> mistake or by run-time error, and everything from then on is trashed.
> Far better to explicitly set exactly the state you expect.

Well, I meant scripts invoked by key bindings, so we actually agree :)


> (Did you intend this to be off-list?)

No. I really regret using GMail for my mailing lists, these days..


Disadvantages of your solution over a native invoption are that you can
not use the normal setopt and that you can not tab complete on
invoption without writing a new completion.


Richard



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