zsh-workers
 help / color / mirror / code / Atom feed
* FAQ bug
@ 1998-11-24 19:15 Phil Pennock
  1998-11-25  8:57 ` Peter Stephenson
  0 siblings, 1 reply; 3+ messages in thread
From: Phil Pennock @ 1998-11-24 19:15 UTC (permalink / raw)
  To: Zsh Development Workers

In section 2.3 of the new FAQ, the first example of the zsh function for
cd is missing the closing double-quotes:
 cd() { builtin cd "$@; echo $PWD; }

As a thought: Bart pointed out $==* as an alternative to "$@" (one would
almost think he wanted to free up the syntax for something else :^) ...
perhaps mention of this in the FAQ in section 3.1 would be appropriate,
and perhaps mention in the table in 2.3(5), comments section.  I think
the point was more that $* was not always correct and relying on
defaults is a bad idea.  Mentioning both together seems to be one of
those hints that might make the concept of the expansion flags 'click'
in the user's mind.

HTH
-- 
--> Phil Pennock ; GAT d- s+:+ a22 C++(++++) UL++++/I+++/S+++/H+ P++@ L+++
E-@ W(+) N>++ o !K w--- O>+ M V !PS PE Y+ PGP+ t-- 5++ X+ R !tv b++>+++ DI+ D+
G+ e+ h* r y?


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

* Re: FAQ bug
  1998-11-24 19:15 FAQ bug Phil Pennock
@ 1998-11-25  8:57 ` Peter Stephenson
  1998-11-25 18:35   ` Phil Pennock
  0 siblings, 1 reply; 3+ messages in thread
From: Peter Stephenson @ 1998-11-25  8:57 UTC (permalink / raw)
  To: Zsh Development Workers

Phil Pennock wrote:
> In section 2.3 of the new FAQ, the first example of the zsh function for
> cd is missing the closing double-quotes:
>  cd() { builtin cd "$@; echo $PWD; }

yup, I've fixed that

> As a thought: Bart pointed out $==* as an alternative to "$@" (one would
> almost think he wanted to free up the syntax for something else :^) ...

There was a problem pointed out by Zoli with $* which still applies to
$==*, namely if you have cd as a function and want to do `cd foo ""'
the null string gets dropped, and it means something completely
different.  There is now a mention of the difference between "$@" and
$* in the shwordsplit section.  I can point out about $==*, if you
don't think it's going to make people's hair stand on end.

-- 
Peter Stephenson <pws@ibmth.df.unipi.it>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56100 Pisa, Italy


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

* Re: FAQ bug
  1998-11-25  8:57 ` Peter Stephenson
@ 1998-11-25 18:35   ` Phil Pennock
  0 siblings, 0 replies; 3+ messages in thread
From: Phil Pennock @ 1998-11-25 18:35 UTC (permalink / raw)
  To: Zsh Development Workers

Typing away merrily, Peter Stephenson produced the immortal words:
> yup, I've fixed that

Oh good.  That's two things that I've gotten right lately.  Maybe I can
keep up the winning streak.

>                                 I can point out about $==*, if you
> don't think it's going to make people's hair stand on end.

How about a parenthesised paragraph, along the lines of:
( If you want a simple life, skip this paragraph.  As an example of the
  power of zsh expansion, $==* is $* with shwordsplit explicitly turned
  off for that one expansion, whilst $=* explicitly turns shwordsplit
  on, effectively acting like the Bourne shell's $* )

but reworded to be clearer.  I'm not good at prose.
-- 
--> Phil Pennock ; GAT d- s+:+ a22 C++(++++) UL++++/I+++/S+++/H+ P++@ L+++
E-@ W(+) N>++ o !K w--- O>+ M V !PS PE Y+ PGP+ t-- 5++ X+ R !tv b++>+++ DI+ D+
G+ e+ h* r y?


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

end of thread, other threads:[~1998-11-25 18:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-11-24 19:15 FAQ bug Phil Pennock
1998-11-25  8:57 ` Peter Stephenson
1998-11-25 18:35   ` Phil Pennock

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