Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 14 Oct 2023 20:03:39 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 274280] Incompatible default shell configuration
Message-ID:  <bug-274280-227-WX3M1mSmE8@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-274280-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-274280-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D274280

--- Comment #1 from Jilles Tjoelker <jilles@FreeBSD.org> ---
The reasoning for exporting ENV was to make sure interactive non-login shel=
ls
have the user's settings such as aliases and shell options, while not exten=
ding
the startup files from the POSIX standard. However, this indeed has the pro=
blem
that the ENV file must be readable by all POSIX-style shells.

Perhaps the cleanest solution is to read, in interactive shells, a file with
some hard-coded name from the user's home directory if ENV is not set. In an
interactive login shell, this file would be read after .profile (if .profile
did not set ENV). The standard dot.profile can then be changed to stop sett=
ing
ENV.

The hard-coded name could be something like .shrc or something new like
.freebsdshrc.

By the way, bash's decision to use the ENV file only when it is invoked as =
sh
or in POSIX mode (in either case, only in interactive shells, as specified =
by
POSIX) helps it here.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-274280-227-WX3M1mSmE8>