zsh-workers
 help / color / mirror / code / Atom feed
* Re: Tar file and Re: Bad interaction between -iprefix and -string
@ 1999-02-12  8:53 Sven Wischnowsky
  1999-02-12  9:28 ` PATCH: zsh-3.1.5-pws-7: "$a[@]" with $a unset Peter Stephenson
  0 siblings, 1 reply; 7+ messages in thread
From: Sven Wischnowsky @ 1999-02-12  8:53 UTC (permalink / raw)
  To: zsh-workers


Bart Schaefer wrote:

> On Feb 11,  6:08pm, Peter Stephenson wrote:
> } Subject: Re: Tar file and Re: Bad interaction between -iprefix and -string
> }
> } [...]  for some reason
> } 
> } for i in "$patcomps[@]"; do
> } 
> } was being called when patcomps was empty (should it really do that?)
> 
> Hmm.  You mean the for loop, looped?  Obviously it shouldn't do that.
> How was patcomps initialized up to that point?

The array isn't initialised at all, look:

  % foo() { echo $# }
  % unset a
  % foo $a[@]
  0                    # fine
  % foo "$a[@]"
  1                    # oops

The same for `$a[*]' and `$a'.

Bye
 Sven


--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re:  PATCH: zsh-3.1.5-pws-7: "$a[@]" with $a unset
@ 1999-02-12  9:48 Sven Wischnowsky
  0 siblings, 0 replies; 7+ messages in thread
From: Sven Wischnowsky @ 1999-02-12  9:48 UTC (permalink / raw)
  To: zsh-workers


Peter Stephenson wrote:

> 
> > The same for `$a[*]' and `$a'.
> 
> That's right, surely?  Quoted variables only expand to nothing if the
> @ is present.

Yep, I wanted to write `... as for...'. Interesting, gives a
completely different sentence.

Bye
 Sven


--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


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

end of thread, other threads:[~1999-02-13  7:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-02-12  8:53 Tar file and Re: Bad interaction between -iprefix and -string Sven Wischnowsky
1999-02-12  9:28 ` PATCH: zsh-3.1.5-pws-7: "$a[@]" with $a unset Peter Stephenson
1999-02-12 15:43   ` Bart Schaefer
1999-02-12 15:45     ` Peter Stephenson
1999-02-12 17:33       ` Bart Schaefer
1999-02-13  7:05         ` PATCH: " Bart Schaefer
1999-02-12  9:48 Sven Wischnowsky

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