Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Exclusion on filename expansion
- X-seq: zsh-users 19505
- From: Vin Shelton <acs@xxxxxxxxxxxxxxxxxxxx>
- To: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- Subject: Re: Exclusion on filename expansion
- Date: Sun, 7 Dec 2014 14:17:28 -0500
- Cc: "zsh-users@xxxxxxx" <zsh-users@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=byJAkW0wooVgXMaX67lxNiPdGJx4Wi6Y1S3tqyMVofw=; b=BYtaVjzMSOkD2u30m/lsflV8PQcTzyNCnLT6ZvZwcZC9HagZb4z2auDWaQ2tTfMca+ Xz5vmZZeasPP/1WvKENyitSOo1s+/ZZ7EXGQHL1AAJIgRcgoO1N/AbmP3FIOU8039hxD R1cEYz7eT7+damuN1VvWM9JZBAkaIC7+WiKtmTW2VReLkRX/jxcoKdToUxJyAD4CXlI3 i8zbBlFnK2RWXNm4AQjPsRhRa4MG37+UKeO/ErcQZ49p7p94bSpTr7GW8jBqqxPQmDv4 HqLoLW3ipf2MloyaStOWieM63BK14zZrCCkwIQLGUc+LM+aHtB5Qw6p8ES4vJRM0Qu4x ex8Q==
- In-reply-to: <201412071901.sB7J1Ymo005977@pws-pc.ntlworld.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: <acs@alumni.princeton.edu> <CACeGjnXxHEArjYrEN8gJsvnP7gztzuumyqzo325OEnSFstB5uA@mail.gmail.com> <201412071901.sB7J1Ymo005977@pws-pc.ntlworld.com>
- Sender: ethersoft@xxxxxxxxx
Thank you, Peter and Bart.
- Vin
On Sun, Dec 7, 2014 at 2:01 PM, Peter Stephenson <
p.w.stephenson@xxxxxxxxxxxx> wrote:
> Vin Shelton wrote:
> > Using a variable, I cannot get ~ exclusion to work:
> >
> > ls *~abc~def
> > ==> ghi jkl
> > pat="abc~def"
> > ls -d *~$pat
> > ==> abc def ghi jkl
> >
> > I think that expansion of $pat is happening after globbing, so in this
> case
> > "*" expands to
> >
> > abc def ghi jkl
> >
> > without the application of the tilde exclusion.
> >
> > Is there something I can do about this?
>
> "setopt glob_subst", or probably better use $~pat which turns on
> glob_subst for that expansion. The "~" may appear to be an obvious
> mnemonic, but actually it was originally introduced to do the more
> standard form of ~-expansion. It now turns on that and glob expansion.
>
> pws
>
Messages sorted by:
Reverse Date,
Date,
Thread,
Author