zsh-users
 help / color / mirror / code / Atom feed
* LC_ALL=C foo, where foo is a shell function
@ 2005-07-09 19:14 Vincent Lefevre
  2005-07-09 20:44 ` Bart Schaefer
  0 siblings, 1 reply; 8+ messages in thread
From: Vincent Lefevre @ 2005-07-09 19:14 UTC (permalink / raw)
  To: zsh-users

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@vinc17.org> - 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


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

end of thread, other threads:[~2008-02-21 18:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-09 19:14 LC_ALL=C foo, where foo is a shell function Vincent Lefevre
2005-07-09 20:44 ` Bart Schaefer
2005-07-10  0:04   ` Vincent Lefevre
2005-07-10  0:13     ` Vincent Lefevre
2005-07-10  0:57     ` Bart Schaefer
2007-04-14 19:38       ` Clint Adams
2007-04-14 20:18         ` Bart Schaefer
2008-02-21 18:21         ` Peter Stephenson

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