Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Exclusion on filename expansion
- X-seq: zsh-users 19502
- From: Vin Shelton <acs@xxxxxxxxxxxxxxxxxxxx>
- To: "zsh-users@xxxxxxx" <zsh-users@xxxxxxx>
- Subject: Exclusion on filename expansion
- Date: Sun, 7 Dec 2014 13:50:23 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:content-type; bh=Vr83uLPa6tIIBscQAenvhlMNY3HxuzPegT6HgxiBi7U=; b=Yhe7P1Bw672GOqd4Thth7JUzgCC09DeuHu4A/g1xbM/sJAhFDzgLpY/rkjtlGBM9xU Xr2SCMkdKlwoftJDlta2Hs1lQc0aLyJZ1q808sOe2tMLMC7pqYbbfGpryB2OBsrTRLEl btOjryKP0THCbhCbbSzgh96m/fbfvrX5v5pb7mCYTBELNHES6BkuNJI3/GlrctrMCXt/ pA2q7fwPyPkovLOtCKRg1CzRYHgO3FFnIWS95Zk9UAepbzdX5FDSOjAGo3D3s/YMLUw0 6gJE6RhOlJKVjkNfpYVp8FYaPT41HuG5q2hSYkFTUARDR8619kZG+ys0IJArg8LfGVx/ xILw==
- 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
- Sender: ethersoft@xxxxxxxxx
Using a variable, I cannot get ~ exclusion to work:
setopt extended_glob
mkdir foo
cd foo
touch abc def ghi jkl
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?
Thanks,
Vin
Messages sorted by:
Reverse Date,
Date,
Thread,
Author