Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
LC_ALL=C foo, where foo is a shell function
- X-seq: zsh-users 9079
- From: Vincent Lefevre <vincent@xxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: LC_ALL=C foo, where foo is a shell function
- Date: Sat, 9 Jul 2005 21:14:01 +0200
- Mail-followup-to: zsh-users@xxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
If I type
foo() { some_command }
LC_ALL=C foo
then this sets LC_ALL to C in the current shell, probably because foo
is evaluated in the current shell. I wonder whether this is wanted or
this is a bug. The zsh FAQ says in "Why do my csh aliases not work?":
Otherwise, your aliases probably contain references to the command
line of the form `\!*', etc. Zsh does not handle this behaviour as
it has shell functions which provide a way of solving this problem
more consistent with other forms of argument handling.
This is not a good advice due to the possible side effects (unless
the above behavior is really a bug, but bash behaves in the same way
as zsh). The FAQ should be updated to point out this problem.
Shouldn't the form with parameter assignments be disavised (except
in the cases where this has the wanted effect) in favor of the env
command?
--
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / SPACES project at LORIA
Messages sorted by:
Reverse Date,
Date,
Thread,
Author