[Bug 274280] Incompatible default shell configuration
- In reply to: bugzilla-noreply_a_freebsd.org: "[Bug 274280] Incompatible default shell configuration"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 14 Oct 2023 20:03:39 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=274280 --- Comment #1 from Jilles Tjoelker <jilles@FreeBSD.org> --- The reasoning for exporting ENV was to make sure interactive non-login shells have the user's settings such as aliases and shell options, while not extending the startup files from the POSIX standard. However, this indeed has the problem 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 setting 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. -- You are receiving this mail because: You are the assignee for the bug.