From 4e2a21d3d2d72146059ad58b4832317990d37b24 Mon Sep 17 00:00:00 2001 From: 宋文武 Date: Fri, 5 Dec 2014 20:01:07 +0800 Subject: system: Cleanup bash startup files. * gnu/system.scm (etc-directory) (bashrc): Rename to 'profile'. * gnu/system/shadow.scm (default-skeletons): Rename '.bashrc' to '.bash_profile'. Don't source /etc/profile. --- gnu/system/shadow.scm | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'gnu/system/shadow.scm') diff --git a/gnu/system/shadow.scm b/gnu/system/shadow.scm index 6970021e1f..4a2322bf69 100644 --- a/gnu/system/shadow.scm +++ b/gnu/system/shadow.scm @@ -115,9 +115,13 @@ (copy-file (car (find-files #$guile-wm "wm-init-sample.scm")) #$output))) - (mlet %store-monad ((bashrc (text-file "bashrc" "\ -# Allow non-login shells such as an xterm to get things right. -test -f /etc/profile && source /etc/profile\n")) + (mlet %store-monad ((profile (text-file "bash_profile" "\ +# Honor per-interactive-shell startup file +if [ -f ~/.bashrc ]; then . ~/.bashrc; fi\n")) + (bashrc (text-file "bashrc" "\ +PS1='\\u@\\h \\w\\$ ' +alias ls='ls -p --color' +alias ll='ls -l'\n")) (guile-wm (gexp->derivation "guile-wm" copy-guile-wm #:modules '((guix build utils)))) @@ -127,7 +131,8 @@ XTerm*metaSendsEscape: true\n")) (gdbinit (text-file "gdbinit" "\ # Tell GDB where to look for separate debugging files. set debug-file-directory ~/.guix-profile/lib/debug\n"))) - (return `((".bashrc" ,bashrc) + (return `((".bash_profile" ,profile) + (".bashrc" ,bashrc) (".Xdefaults" ,xdefaults) (".guile-wm" ,guile-wm) (".gdbinit" ,gdbinit))))) -- cgit v1.2.3