zsh-users
 help / color / mirror / code / Atom feed
* Help von glob_subst
@ 1996-05-13 14:18 Helmut Jarausch
  1996-05-13 16:00 ` Zoltan Hidvegi
  0 siblings, 1 reply; 2+ messages in thread
From: Helmut Jarausch @ 1996-05-13 14:18 UTC (permalink / raw)
  To: zsh-users


Please help,

I have been using the following construct quite often (recently it does not work
any more, since there has been a `bug fix` in ZSH)

e.g.
file  Test

#!/bin/zsh
Pattern=$1(.)
eval List=$Pattern


invoking it like

Test `**/*`

I got the expansion in $List.

How is it done now?

Thanks for any helps.




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

* Re: Help von glob_subst
  1996-05-13 14:18 Help von glob_subst Helmut Jarausch
@ 1996-05-13 16:00 ` Zoltan Hidvegi
  0 siblings, 0 replies; 2+ messages in thread
From: Zoltan Hidvegi @ 1996-05-13 16:00 UTC (permalink / raw)
  To: Helmut Jarausch; +Cc: zsh-users

> 
> Please help,
> 
> I have been using the following construct quite often (recently it does not work
> any more, since there has been a `bug fix` in ZSH)
> 
> e.g.
> file  Test
> 
> #!/bin/zsh
> Pattern=$1(.)
> eval List=$Pattern
> 
> 
> invoking it like
> 
> Test `**/*`
> 
> I got the expansion in $List.
> 
> How is it done now?

I mentioned this change in the announcement of beta17 (which was admittedly
quite long and boring :-)).  The right-hand side of assignments are no
longer globbed by default.  You should use

foo=( glob-pattern )

if you want an array of matches.  This has always been the preferred way to
create arrays, now it is the only way (besides set -A).  See also in the
zshoptions manual page the description of the GLOB_ASSIGN option.

But for your problem there is an even simpler solution:

#!/bin/zsh
List=( $~1(.) )

Zoltan



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

end of thread, other threads:[~1996-05-13 16:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-05-13 14:18 Help von glob_subst Helmut Jarausch
1996-05-13 16:00 ` Zoltan Hidvegi

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