Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: variables as grouping alternative?



Hi,

2013/7/24 Vin Shelton <acs@xxxxxxxxxxxxxxxxxxxx>:
> Is there a way to use a variable as a grouping alternative?  E.g.:
>
> pkgbase=libpng
> f=( $ZIPROOT/$pkgbase-*.(tar|tar.*|tgz)(Nom) ); echo $f
>
> yields:
> /opt/zip/libpng-1.6.3.tar.gz /opt/zip/libpng-1.2.46.tar.gz
> /opt/zip/libpng-1.2.40.tar.xz /opt/zip/libpng-1.2.31.tar.bz2
>
> x="tar|tar.*|tgz"
> f=( $ZIPROOT/$pkgbase-*.($x)(Nom) ); echo $f
>
> yields nothing

Try $~x instead of $x.

Best regards,

-- 
Jérémie



Messages sorted by: Reverse Date, Date, Thread, Author