aboutsummaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2022-05-13 15:08:14 -0300
committerEuAndreh <eu@euandre.org>2022-05-13 15:08:17 -0300
commite3c2736b4e0e286d4038a6044d66a58d02ec111d (patch)
tree606ba334c269f14ab9c4a6d0c1fcc94f4d7e48fe /etc
parentetc/bash/rc: Include `f ...` and `v ...` in shell history (diff)
downloaddotfiles-e3c2736b4e0e286d4038a6044d66a58d02ec111d.tar.gz
dotfiles-e3c2736b4e0e286d4038a6044d66a58d02ec111d.tar.xz
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.
Diffstat (limited to 'etc')
-rw-r--r--etc/bash/rc2
1 files changed, 2 insertions, 0 deletions
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*)