Steffen Daode Nurpmeso dixit:

>Thorsten Glaser <[email protected]> wrote:

> |Steffen Daode Nurpmeso dixit:
> |
> |>export ENV
> |
> |Do *not* export ENV. Ever! (Nor PS1 for that matter.)
>
>I'm living a public live and share what i have :) ?

Oh well, this was worded a bit badly.

About PS1: it’s true, do *not* export it, ever. This is
something maintainers and packagers of various shells have
agreed on some while back, to avoid running into issues
when shell A gets a prompt that uses shell B’s features.
(dash is known to run into endless loops with some of the
PS1s I shipped with mksh over the years, for example.)

About ENV, this is more for distributors (FreeBSD®, I’m
looking at you!). It turns out that exporting ENV in
/etc/profile to a script knowing bash and sh is not
all that wise in case someone runs mksh (and, adding
support for mksh to that file is also bad, because, in
the totally hypothetical¹ situation of someone writing
yet another shell (yash), explicit support for it is
also missing… it’s thus *much* better to use the shell-
specific startup files (.bashrc, .mkshrc, and so on),
and possibly source (“dot”) a common file after setting
some things, should the need for such sharing arise).

① http://packages.debian.org/sid/yash notwithstanding.
  The situation is, of course, completely hypothetical.
  I mean, why would someone want to run something else
  than GNU bash (the GNU/Linux converts) or sh/ash on
  FreeBSD®, I mean, not having tab completion for 30+
  years is a good thing, and the developers don’t want
  to change it, or so I was told at several conferences…

bye,
//mirabilos
-- 
FWIW, I'm quite impressed with mksh interactively. I thought it was much
*much* more bare bones. But it turns out it beats the living hell out of
ksh93 in that respect. I'd even consider it for my daily use if I hadn't
wasted half my life on my zsh setup. :-) -- Frank Terbeck in #!/bin/mksh

Reply via email to