zsh-users
 help / color / mirror / code / Atom feed
* golf : $~pattern:t ?
@ 2005-12-21 20:13 Marc Chantreux
  2005-12-22  4:36 ` Bart Schaefer
  0 siblings, 1 reply; 3+ messages in thread
From: Marc Chantreux @ 2005-12-21 20:13 UTC (permalink / raw)
  To: zsh-users

hi all,

is there a shorter way to

files=( $~pattern )
files=( $files:t )

?

regards
mc


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: golf : $~pattern:t ?
  2005-12-21 20:13 golf : $~pattern:t ? Marc Chantreux
@ 2005-12-22  4:36 ` Bart Schaefer
  2005-12-22  9:47   ` Marc Chantreux
  0 siblings, 1 reply; 3+ messages in thread
From: Bart Schaefer @ 2005-12-22  4:36 UTC (permalink / raw)
  To: zsh-users

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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: golf : $~pattern:t ?
  2005-12-22  4:36 ` Bart Schaefer
@ 2005-12-22  9:47   ` Marc Chantreux
  0 siblings, 0 replies; 3+ messages in thread
From: Marc Chantreux @ 2005-12-22  9:47 UTC (permalink / raw)
  To: zsh-users

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-12-22  9:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-21 20:13 golf : $~pattern:t ? Marc Chantreux
2005-12-22  4:36 ` Bart Schaefer
2005-12-22  9:47   ` Marc Chantreux

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).