Mark H Weaver <[email protected]> skribis: > [email protected] (Ludovic Courtès) writes: > >> 宋文武 <[email protected]> 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
Yes. >>> +# 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. OK, that makes sense to me. Ludo’.
