Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Support for inverting of options?
- X-seq: zsh-users 11842
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Support for inverting of options?
- Date: Fri, 14 Sep 2007 23:36:13 -0700
- In-reply-to: <2d460de70709141729y392e7b2dmf137334dc2ee4eec@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <2d460de70709141729y392e7b2dmf137334dc2ee4eec@xxxxxxxxxxxxxx>
On Sep 15, 2:29am, Richard Hartmann wrote:
}
} I am wondering what other people think about an option like vim's
}
} :set invoption
}
} What do you guys think about this? Is this a worthwhile feature
} or is this use case pretty much limited to myself?
Personally I almost never change the setting of an option, and when
I do I always know in which direction I want it to end up. If this
is nothing but a way to change an option temporarily and then change
it back without thinking about whether you need the "no" prefix, then
I'd be inclined not to expend built-in code on it.
function :set {
setopt nolocaloptions
local o
zmodload -i zsh/parameter
for o; do setopt ${o/inv/${${options[${o/inv/}]/on/no}/off/}}; done
}
That works for everything but localoptions itself.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author