Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Docs fix
- X-seq: zsh-workers 4450
- From: Phil Pennock <phil@xxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxxx
- Subject: Docs fix
- Date: Mon, 26 Oct 1998 23:03:47 +0000 (GMT)
Quick docs fix; fairly trivial.
The first one is just some stuff for the FAQ about $* vs "$@"
The second one is a couple of fixes for grammar.yo -- a typo and a
semantic flaw.
They're both small, so in just one mail. I think you can just stick two
diffs together the way I have ...
-Phil
-----------------------------< cut here >-------------------------------
*** Etc/FAQ.yo.old Wed Apr 29 00:50:21 1998
--- Etc/FAQ.yo Thu Oct 15 23:25:21 1998
***************
*** 687,698 ****
)
can be replaced by the zsh function,
verb(
! cd() { builtin cd $*; echo $PWD; }
)
(the `builtin' tells zsh to use its own `cd', avoiding an infinite loop)
or, perhaps better,
verb(
! cd() { builtin cd $*; print -D $PWD; }
)
(which converts your home directory to a tt(~)). In fact, this problem is
better solved by defining the special function chpwd() (see the manual).
--- 687,698 ----
)
can be replaced by the zsh function,
verb(
! cd() { builtin cd "$@"; echo $PWD; }
)
(the `builtin' tells zsh to use its own `cd', avoiding an infinite loop)
or, perhaps better,
verb(
! cd() { builtin cd "$@"; print -D $PWD; }
)
(which converts your home directory to a tt(~)). In fact, this problem is
better solved by defining the special function chpwd() (see the manual).
***************
*** 704,719 ****
SETCOUNTER(XXenumcounter)(0)
enumerate(
myeit() If the csh alias references "parameters" (tt(\!:1), tt(\!*) etc.),
! then in zsh you need a function (referencing tt($1), tt($*) etc.).
Otherwise, you can use a zsh alias.
myeit() If you use a zsh function, you need to refer _at_least_ to
! tt($*) in the body (inside the tt({ })). Parameters don't magically
appear inside the tt({ }) the way they get appended to an alias.
myeit() If the csh alias references its own name (tt(alias rm "rm -i")),
then in a zsh function you need the "command" keyword
! (function tt(rm() { command rm -i $* })), but in a zsh alias
you don't (tt(alias rm="rm -i")).
myeit() If you have aliases that refer to each other (tt(alias ls "ls -C";
--- 704,719 ----
SETCOUNTER(XXenumcounter)(0)
enumerate(
myeit() If the csh alias references "parameters" (tt(\!:1), tt(\!*) etc.),
! then in zsh you need a function (referencing tt($1), tt($*) or tt("$@") etc.).
Otherwise, you can use a zsh alias.
myeit() If you use a zsh function, you need to refer _at_least_ to
! tt($*) or tt("$@") in the body (inside the tt({ })). Parameters don't magically
appear inside the tt({ }) the way they get appended to an alias.
myeit() If the csh alias references its own name (tt(alias rm "rm -i")),
then in a zsh function you need the "command" keyword
! (function tt(rm() { command rm -i "$@" })), but in a zsh alias
you don't (tt(alias rm="rm -i")).
myeit() If you have aliases that refer to each other (tt(alias ls "ls -C";
***************
*** 766,772 ****
There is one other serious problem with aliases: consider
verb(
alias l='/bin/ls -F'
! l() { /bin/ls -la $* | more }
)
mytt(l) in the function definition is in command position and is expanded
as an alias, defining mytt(/bin/ls) and mytt(-F) as functions which call
--- 766,772 ----
There is one other serious problem with aliases: consider
verb(
alias l='/bin/ls -F'
! l() { /bin/ls -la "$@" | more }
)
mytt(l) in the function definition is in command position and is expanded
as an alias, defining mytt(/bin/ls) and mytt(-F) as functions which call
*** Doc/Zsh/grammar.yo.old Thu Oct 15 23:28:26 1998
--- Doc/Zsh/grammar.yo Thu Oct 15 23:35:11 1998
***************
*** 117,123 ****
cindex(for loops)
cindex(loops, for)
item(tt(for) var(name) [ tt(in) var(word) ... var(term) ] tt(do) var(list) tt(done))(
! where var(term) is one ore more newline or tt(;).
Expand the list of var(word)s, and set the parameter
var(name) to each of them in turn, executing
var(list) each time. If the tt(in) var(word) is omitted,
--- 117,123 ----
cindex(for loops)
cindex(loops, for)
item(tt(for) var(name) [ tt(in) var(word) ... var(term) ] tt(do) var(list) tt(done))(
! where var(term) is one or more newline or tt(;).
Expand the list of var(word)s, and set the parameter
var(name) to each of them in turn, executing
var(list) each time. If the tt(in) var(word) is omitted,
***************
*** 211,217 ****
cindex(testing conditional expression)
item(tt([[) var(exp) tt(]]))(
Evaluates the conditional expression var(exp)
! and return a zero exit status if it is true.
See noderef(Conditional Expressions)
for a description of var(exp).
)
--- 211,217 ----
cindex(testing conditional expression)
item(tt([[) var(exp) tt(]]))(
Evaluates the conditional expression var(exp)
! and return a zero exit status iff it is true.
See noderef(Conditional Expressions)
for a description of var(exp).
)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author