aboutsummaryrefslogtreecommitdiff
path: root/gnu/home
diff options
context:
space:
mode:
authorRichard Sent <richard@freakingpenguin.com>2024-04-04 18:53:27 -0400
committerLudovic Courtès <ludo@gnu.org>2024-04-29 23:54:13 +0200
commit44c8ce8334ade3612747d72784fa4af9fdaa71f4 (patch)
treec4967747b354842497bb65636cc8e46ccefc9c20 /gnu/home
parent08bb2dbb13cc7180a9d8316f9d52b6f7a20d5e8d (diff)
downloadguix-44c8ce8334ade3612747d72784fa4af9fdaa71f4.tar
guix-44c8ce8334ade3612747d72784fa4af9fdaa71f4.tar.gz
home: services: bash: Move default PS1 prompt to bashrc
Fixes <https://issues.guix.gnu.org/70164>. * home/services/shells.scm (add-bash-configuration): Move default PS1 prompt from .bash_profile to .bashrc. Change-Id: Ic437458ee362cc4aa803a71c9962af866749f59a Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu/home')
-rw-r--r--gnu/home/services/shells.scm14
1 files changed, 5 insertions, 9 deletions
diff --git a/gnu/home/services/shells.scm b/gnu/home/services/shells.scm
index 8fd1668b59..ee6b09f17c 100644
--- a/gnu/home/services/shells.scm
+++ b/gnu/home/services/shells.scm
@@ -415,21 +415,17 @@ if [ -f ~/.profile ]; then source ~/.profile; fi
if [ -f ~/.bashrc ]; then source ~/.bashrc; fi
"
- ;; The host distro might provide a bad 'PS1' default--e.g., not taking
- ;; $GUIX_ENVIRONMENT into account. Provide a good default here when
- ;; asked to. The default can be overridden below via
- ;; 'environment-variables'.
- (if (home-bash-configuration-guix-defaults? config)
- "PS1='\\u@\\h \\w${GUIX_ENVIRONMENT:+ [env]}\\$ '\n"
- "")
-
(serialize-field 'bash-profile)
(serialize-field 'environment-variables)))
,@(list (file-if-not-empty
'bashrc
(if (home-bash-configuration-guix-defaults? config)
- (list (plain-file-content %default-bashrc)
+ (list (plain-file-content %default-bashrc) "\n"
+ ;; The host distro might provide a bad 'PS1'
+ ;; default--e.g., not taking $GUIX_ENVIRONMENT into
+ ;; account. Provide a good default here when asked.
+ "PS1='\\u@\\h \\w${GUIX_ENVIRONMENT:+ [env]}\\$ '\n"
(serialize-field 'aliases))
(list (serialize-field 'aliases))))
(file-if-not-empty 'bash-logout)))))