Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
*$var*/* and recursive globbing
- X-seq: zsh-workers 31001
- From: Stephane Chazelas <stephane.chazelas@xxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: *$var*/* and recursive globbing
- Date: Sat, 26 Jan 2013 22:25:19 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:date:from:to:subject:message-id:mail-followup-to :mime-version:content-type:content-disposition:user-agent; bh=cl8qv8hf2gtVCDNs2XY83e1VqpXHTdT+7Um5g+F7Z8s=; b=K7txAPUOoNmLaFmoC1z1PZVnO7GwRK0cEdpwp/y4K2h6Wrl/yTBtKYbU/BgHj/ZgMt gtV1t3pxkloCWkTAKtaYsyQOs6bEJGm72AdKhek9pet03NF1wmD4IF5jZiDwyHie+hvY 5+1IACbJ7ZfMU88JElD1kHyM6xLFiIv8IpeNQpZ3Ut8j4PCVgiowhVObHknUcwJMSuEl kHZ3qd8FYuHmLn6PaMDVJ6fxshkvQWj+AD6QQEiXlUV99bG+dfs5y7+RkfvP3kPLBPWB 9FuGS3u+mV3acH3Bp8JEYsnjYfUNCAC9+sOPqfU3Q4uVJSM4gVKRsFslsBN/gTmM86nK wzBQ==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mail-followup-to: Zsh hackers list <zsh-workers@xxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
Hiya,
With zsh (but also ksh -G and bash -O globstar),
*"$var"*/* where $var is empty, expands like **/* while it
sounds to me like not the right thing to do. It can be worked
around by doing (*"$var"*)/*, but that requires extended_glob.
I would say that's a case where there's a fair chance to break a
perfectly correct POSIX script (considering that **/ is not
disabled in sh emulation).
I would be of the opinion that **/ (and ***/) should recurse only when
entered as is (or at least the two stars entered as is).
What do you think?
--
Stephane
Messages sorted by:
Reverse Date,
Date,
Thread,
Author