From: Bart Schaefer <schaefer@brasslantern.com>
To: Zsh Users <zsh-users@zsh.org>, vogt@linux.vnet.ibm.com
Subject: Re: emulate zsh *except* pushd related options
Date: Wed, 23 Dec 2015 08:31:18 -0800 [thread overview]
Message-ID: <CAH+w=7ZVu=BbyRngn6apewLy_nHW0fByRweZRXq+uAGC6xPU4Q@mail.gmail.com> (raw)
In-Reply-To: <20151223141913.GA10364@linux.vnet.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 662 bytes --]
On Dec 23, 2015 6:30 AM, "Dominik Vogt" <vogt@linux.vnet.ibm.com> wrote:
>
> On Tue, Dec 22, 2015 at 08:57:47PM -0800, Bart Schaefer wrote:
>
> >
> > The "emulate" command accepts the same "-o optionn_name" (or "+o") as
> > shell startup, so you can do
> >
> > emulate -L zsh -o shwordsplit ...
>
> Unfortunately my zsh is too old for that.
You can substitute
local opts
opts=( ... )
emulate -L zsh
set $opts
> > For your specific use case, the current state of the pushd and cd
options
> > can be enumerated this way:
> >
> > ${(Oa)${${(kv)options[(I)*pushd*|cd*|*cd]/off/+o}/on/-o}}
That should work in older zsh too, for the value of $opts above.
prev parent reply other threads:[~2015-12-23 16:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-22 8:30 Dominik Vogt
2015-12-23 4:57 ` Bart Schaefer
2015-12-23 14:19 ` Dominik Vogt
2015-12-23 16:31 ` Bart Schaefer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAH+w=7ZVu=BbyRngn6apewLy_nHW0fByRweZRXq+uAGC6xPU4Q@mail.gmail.com' \
--to=schaefer@brasslantern.com \
--cc=vogt@linux.vnet.ibm.com \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).