zsh-users
 help / color / mirror / code / Atom feed
From: Vin Shelton <acs@alumni.princeton.edu>
To: Peter Stephenson <p.w.stephenson@ntlworld.com>
Cc: "zsh-users@zsh.org" <zsh-users@zsh.org>
Subject: Re: Exclusion on filename expansion
Date: Sun, 7 Dec 2014 14:17:28 -0500	[thread overview]
Message-ID: <CACeGjnUkCpQE2PFTKC_YoE-oFj6b416jni+z9jnr8c-YFFRbAg@mail.gmail.com> (raw)
In-Reply-To: <201412071901.sB7J1Ymo005977@pws-pc.ntlworld.com>

[-- Attachment #1: Type: text/plain, Size: 830 bytes --]

Thank you, Peter and Bart.

  - Vin

On Sun, Dec 7, 2014 at 2:01 PM, Peter Stephenson <
p.w.stephenson@ntlworld.com> 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
>

  reply	other threads:[~2014-12-07 19:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <acs@alumni.princeton.edu>
2014-12-07 18:50 ` Vin Shelton
2014-12-07 19:01   ` Peter Stephenson
2014-12-07 19:17     ` Vin Shelton [this message]
2014-12-07 19:02   ` Bart Schaefer

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=CACeGjnUkCpQE2PFTKC_YoE-oFj6b416jni+z9jnr8c-YFFRbAg@mail.gmail.com \
    --to=acs@alumni.princeton.edu \
    --cc=p.w.stephenson@ntlworld.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).