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

Re: golf : $~pattern:t ?



Bart Schaefer a écrit :

On Dec 21,  9:13pm, Marc Chantreux wrote:
}
} files=( $~pattern )
} files=( $files:t )

Should work to do

	files=( $~pattern(:t) )

That is, use :t as a glob qualifier rather than as a parameter suffix.
I've tried it but it failed so thought that i misunderstood the man ... thanks for you, i understood that it was a $pattern specific error.

in fact, my pattern was : /home/mc/src/2z/expo/*(jpeg|jpg|png|JPEG|JPG|PNG)(N)
so the complete one :

/home/mc/src/2z/expo/*(jpeg|jpg|png|JPEG|JPG|PNG)(N)(:t)

must be :

/home/mc/src/2z/expo/*(jpeg|jpg|png|JPEG|JPG|PNG)(N:t)

thanks!

regards
mc



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