unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
* bug#70164: [bug#70205] [PATCH] home: services: bash: Move default PS1 prompt to bashrc
       [not found] <c22ff49a18ad2323e4cf4a7fa6b25d006b50e03a.1712271207.git.richard@freakingpenguin.com>
@ 2024-04-29 21:53 ` Ludovic Courtès
  0 siblings, 0 replies; only message in thread
From: Ludovic Courtès @ 2024-04-29 21:53 UTC (permalink / raw)
  To: Richard Sent
  Cc: 70205-done, paren, Tanguy Le Carrour, Andrew Tropin, 70164-done

[-- Attachment #1: Type: text/plain, Size: 555 bytes --]

Hi Richard,

Richard Sent <richard@freakingpenguin.com> skribis:

> Reported in <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

Sounds reasonable to me; thanks for the clear explanation in
<https://issues.guix.gnu.org/70164>.

There was one missing newline before aliases so I made the following
change (adding two newlines, for good measure).

Applied, thanks!

Ludo’.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1031 bytes --]

diff --git a/gnu/home/services/shells.scm b/gnu/home/services/shells.scm
index a5b2586dde..ee6b09f17c 100644
--- a/gnu/home/services/shells.scm
+++ b/gnu/home/services/shells.scm
@@ -421,11 +421,11 @@ (define (add-bash-configuration config)
      ,@(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]}\\$ '"
+                        "PS1='\\u@\\h \\w${GUIX_ENVIRONMENT:+ [env]}\\$ '\n"
                         (serialize-field 'aliases))
                   (list (serialize-field 'aliases))))
              (file-if-not-empty 'bash-logout)))))

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2024-04-29 21:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <c22ff49a18ad2323e4cf4a7fa6b25d006b50e03a.1712271207.git.richard@freakingpenguin.com>
2024-04-29 21:53 ` bug#70164: [bug#70205] [PATCH] home: services: bash: Move default PS1 prompt to bashrc Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).