From e3c2736b4e0e286d4038a6044d66a58d02ec111d Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Fri, 13 May 2022 15:08:14 -0300 Subject: etc/bash/rc: Link ~/.bashrc to ~/.profile and add set $ENV to ~/.profile Make .profile the only configuration file for shells. It concentrates not only environment variables as login files should, but also aliases, functions, etc. Setting $ENV to ~/.profile makes interactive calls to `sh` load this files, and symlinking ~/.bashrc makes interactive calls to `bash` do the same. Ultimately, I find that the separation of environment variables to login files, usually in ~/.bash_profile, to make sense when thinking about user sessions and logins, but not something I benefit from. Staying logged in for multiple days, I modify environment variables that I want to affect my existing and new terminal sessions, and having to do extra work for getting those new values (such as an extra command that sources ~/.profile) isn't interesting to me. --- etc/bash/rc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'etc/bash') diff --git a/etc/bash/rc b/etc/bash/rc index 08ed9f0..c406d34 100644 --- a/etc/bash/rc +++ b/etc/bash/rc @@ -3,6 +3,8 @@ if [ -r /etc/bashrc ]; then . /etc/bashrc fi +ln -fs .profile ~/.bashrc +export ENV=~/.profile case $- in *i*) -- cgit v1.2.3