Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Silent setopt
On Wed, 23 Jan 2013 11:32:54 +0000
Peter Stephenson <p.stephenson@xxxxxxxxxxx> wrote:
> On Wed, 23 Jan 2013 11:21:38 +0100
> İsmail Dönmez <ismail@xxxxxxxxx> wrote:
> > I am using the same zsh config across a lot of machine which have all kinds
> > of versions of zsh and when I ssh into an old zsh machine I get
> >
> > setopt:47: no such option: COMBININGCHARS
> > setopt:48: no such option: HASH_EXECUTABLESONLY
> >
> > Which is expected but gets boring after some time. So I wonder if there is
> > a way to silence setopt for unsupported options?
>
> It should be as simple as
>
> setopt COMBININGCHARS HASHEXECUTABLESONLY 2>/dev/null
Ooh, I've noted a slightly more sophisticated (but slower) way in my
.zshrc.
zmodload -i zsh/parameter
for opt in incappendhistory histexpiredupsfirst typesetsilent; do
[[ -n ${options[$opt]} ]] && setopt $opt
done
This relies on the special options associative array, also used by
completion.
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author