* Silent setopt
@ 2013-01-23 10:21 İsmail Dönmez
2013-01-23 11:32 ` Peter Stephenson
0 siblings, 1 reply; 4+ messages in thread
From: İsmail Dönmez @ 2013-01-23 10:21 UTC (permalink / raw)
To: zsh-users
[-- Attachment #1: Type: text/plain, Size: 378 bytes --]
Hi,
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?
Regards,
ismail
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Silent setopt
2013-01-23 10:21 Silent setopt İsmail Dönmez
@ 2013-01-23 11:32 ` Peter Stephenson
2013-01-23 12:14 ` Peter Stephenson
0 siblings, 1 reply; 4+ messages in thread
From: Peter Stephenson @ 2013-01-23 11:32 UTC (permalink / raw)
To: zsh-users
On Wed, 23 Jan 2013 11:21:38 +0100
İsmail Dönmez <ismail@donmez.ws> 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
I wonder why setopt always returns status 0, no matter what happens?
pws
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Silent setopt
2013-01-23 11:32 ` Peter Stephenson
@ 2013-01-23 12:14 ` Peter Stephenson
2013-01-23 12:28 ` İsmail Dönmez
0 siblings, 1 reply; 4+ messages in thread
From: Peter Stephenson @ 2013-01-23 12:14 UTC (permalink / raw)
To: zsh-users
On Wed, 23 Jan 2013 11:32:54 +0000
Peter Stephenson <p.stephenson@samsung.com> wrote:
> On Wed, 23 Jan 2013 11:21:38 +0100
> İsmail Dönmez <ismail@donmez.ws> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Silent setopt
2013-01-23 12:14 ` Peter Stephenson
@ 2013-01-23 12:28 ` İsmail Dönmez
0 siblings, 0 replies; 4+ messages in thread
From: İsmail Dönmez @ 2013-01-23 12:28 UTC (permalink / raw)
To: Peter Stephenson; +Cc: zsh-users
[-- Attachment #1: Type: text/plain, Size: 1149 bytes --]
Hi;
On Wed, Jan 23, 2013 at 1:14 PM, Peter Stephenson
<p.stephenson@samsung.com>wrote:
> On Wed, 23 Jan 2013 11:32:54 +0000
> Peter Stephenson <p.stephenson@samsung.com> wrote:
> > On Wed, 23 Jan 2013 11:21:38 +0100
> > İsmail Dönmez <ismail@donmez.ws> 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.
>
Elegant, thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-01-23 12:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-23 10:21 Silent setopt İsmail Dönmez
2013-01-23 11:32 ` Peter Stephenson
2013-01-23 12:14 ` Peter Stephenson
2013-01-23 12:28 ` İsmail Dönmez
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).