l...@gnu.org (Ludovic Courtès) writes: > 宋文武 <iyzs...@gmail.com> skribis: > >> + (mlet %store-monad ((bash-profile (text-file "bash_profile" "\ >> +# honor ~/.bashrc if the shell is interactive >> +[[ $- == *i* ]] && source ~/.bashrc > > I don’t think the test is needed, because ~/.bash_profile is only read > by interactive Bash.
Indeed. However, it would be good to check if ~/.bashrc exists. Section 6.2 of the Bash manual suggests this: if [ -f ~/.bashrc ]; then . ~/.bashrc; fi >> +# load system-wide environment varibales >> +source /etc/environment >> + >> +# common varibales for user profile >> +export PATH=$HOME/.guix-profile/bin:$HOME/.guix-profile/sbin:$PATH >> +export INFOPATH=$HOME/.guix-profile/share/info:$INFOPATH\n")) >> + (bashrc (text-file "bashrc" "\ >> +PS1='\\u@\\h \\w\\$ ' > > I think PS1 should go to /etc/profile. WDYT? I agree with 宋文武 that the PS1 setting belongs in the default ~/.bashrc skeleton. I would prefer to keep settings like this, that are purely a matter of personal taste, out of system-wide files. Also, /etc/profile is read by other shells, and I don't know that the syntax above is portable. Regards, Mark