mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
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>
This commit is contained in:
parent
08bb2dbb13
commit
44c8ce8334
1 changed files with 5 additions and 9 deletions
|
@ -415,21 +415,17 @@ (define* (file-if-not-empty field #:optional (extra-content #f))
|
|||
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)))))
|
||||
|
|
Loading…
Reference in a new issue