From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: use zsh as login shell Date: Fri, 05 Dec 2014 19:54:12 +0100 Message-ID: <871toe3p2j.fsf@gnu.org> References: <87k32gtz2p.fsf@gmail.com> <87mw7cjt7b.fsf@gnu.org> <87mw7b74ar.fsf@gmail.com> <8761dzynah.fsf@gnu.org> <87vblyy9ia.fsf@gmail.com> <87egsjcyst.fsf@gnu.org> <87wq6aun7b.fsf@gmail.com> <87oarjqadw.fsf@gnu.org> <87h9xa65q6.fsf@yeeloong.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36675) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xwy1S-00011q-J2 for guix-devel@gnu.org; Fri, 05 Dec 2014 13:54:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xwy1N-0001by-Qu for guix-devel@gnu.org; Fri, 05 Dec 2014 13:54:34 -0500 Received: from hera.aquilenet.fr ([2a01:474::1]:49451) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xwy1N-0001bm-L2 for guix-devel@gnu.org; Fri, 05 Dec 2014 13:54:29 -0500 In-Reply-To: <87h9xa65q6.fsf@yeeloong.lan> (Mark H. Weaver's message of "Fri, 05 Dec 2014 00:11:29 -0500") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Mark H Weaver Cc: guix-devel@gnu.org Mark H Weaver skribis: > ludo@gnu.org (Ludovic Court=C3=A8s) writes: > >> =E5=AE=8B=E6=96=87=E6=AD=A6 skribis: >> >>> + (mlet %store-monad ((bash-profile (text-file "bash_profile" "\ >>> +# honor ~/.bashrc if the shell is interactive >>> +[[ $- =3D=3D *i* ]] && source ~/.bashrc >> >> I don=E2=80=99t think the test is needed, because ~/.bash_profile is onl= y 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=3D$HOME/.guix-profile/bin:$HOME/.guix-profile/sbin:$PATH >>> +export INFOPATH=3D$HOME/.guix-profile/share/info:$INFOPATH\n")) >>> + (bashrc (text-file "bashrc" "\ >>> +PS1=3D'\\u@\\h \\w\\$ ' >> >> I think PS1 should go to /etc/profile. WDYT? > > I agree with =E5=AE=8B=E6=96=87=E6=AD=A6 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=E2=80=99.