From: Jakub Czajka Date: Mon, 30 May 2022 07:24:20 +0000 (+0200) Subject: [bash] Avoid sourcing .bash_profile in .bashrc. X-Git-Url: https://git.ekhem.eu.org/?a=commitdiff_plain;h=7d662cdd4425b405ca65c27112178a900f900c93;p=guix.git [bash] Avoid sourcing .bash_profile in .bashrc. .bashrc is sourced by interactive non-login shells. However, these shells are run in an environment that was started through a login shell. Therefore, an interactive non-login shell should have inherited environment variables created by a login shell in .bash_profile. --- diff --git a/bash/.bashrc b/bash/.bashrc index 2a98ec7..2b73f4d 100644 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -4,12 +4,7 @@ # # .bashrc - bash dotfile for interactive shells. # -# Sources $HOME/.bash_profile. See bash(1) for more information about interactive -# shells. - -if [ -f "${HOME}/.bash_profile" ]; then - . ${HOME}/.bash_profile -fi +# See bash(1) for more information about interactive shells. # Prompt export PS1="[\w]$ "