Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: emulate zsh *except* pushd related options
- X-seq: zsh-users 21099
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>, vogt@xxxxxxxxxxxxxxxxxx
- Subject: Re: emulate zsh *except* pushd related options
- Date: Wed, 23 Dec 2015 08:31:18 -0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=9a0GUNGkY2C09bSMIn/4bBKzJGKMGvAJhxD22pSgw3M=; b=sx+ndfA0pr+8RJdW+Q8efqjNa89ENmvboWIhfm5crd0eoBbBkyEwjVlB38gGAl3zF+ wojQjlLzrDo6IgoIuB+Fa++aXW4mz5zkKbuncUPTHFEakwkchx2hKxyHNg335h0ZRCT6 wPnDpyU5Z6Wyyjy4ucwWjbiFjMeZeqcDWf1qAO66D7xdM7m8NqnDWT3gP6NOHC42wcaa zswYBXArBoCT4pyahtdgfukd9GZKV+6TzIqw0Kei5K5EfvtzzCY+UTAwV+CxXjUkHMt1 L0L3x3UHVNPJ+SB72w5Xf1G4tNfl4RslKrH9R8QRKdAqVIkt31I8Kqa+tn8lBO244qza 8eCQ==
- In-reply-to: <20151223141913.GA10364@linux.vnet.ibm.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <20151222083043.GA6457@linux.vnet.ibm.com> <151222205747.ZM29374@torch.brasslantern.com> <20151223141913.GA10364@linux.vnet.ibm.com>
On Dec 23, 2015 6:30 AM, "Dominik Vogt" <vogt@xxxxxxxxxxxxxxxxxx> 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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author