Subject: sh(1), `export' and the environment (was Re: Odd sh(1) behavior wrt $TERM)
To: Nathan Dorfman <firstname.lastname@example.org>
From: Nathan Dorfman <email@example.com>
Date: 01/21/2002 13:54:36
On Mon, Jan 21, 2002 at 11:49:39AM -0500, Nathan Dorfman wrote:
> $ TERM=xterm; export TERM
> $ echo $TERM
> $ set -E
> No entry for terminal type "xterm-color";
> using dumb terminal settings.
Looking over the sh/libedit source, it seems to me that rather than
changing its own environment, the shell maintains its own list of
'exported' variables to place in the environment of new processes...
libedit, however, calls getenv("TERM") in the original process,
which gives it back the original (broken) value.
Does anyone have any thoughts/comments on this? The current behavior
seems rather broken to me, does anyone disagree?
"Just because a few of us can read and \ \ \\ Nathan Dorfman
write and do a little math, that doesn't \ \\ firstname.lastname@example.org
mean we deserve to take over the universe." \ \ \\ PGP Key 0832DB12