all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#54356] [PATCH] home: services: Fix bash aliases without guix-defaults.
@ 2022-03-12 20:53 angry rectangle
  2022-03-12 22:05 ` angry rectangle
  0 siblings, 1 reply; 3+ messages in thread
From: angry rectangle @ 2022-03-12 20:53 UTC (permalink / raw)
  To: 54356

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

Because of a typo, aliases aren't included if guix-defaults? is #f.

This patch also fixes an inaccuracy in the documentation about placement of defaults.
They're actually put at the top, after aliases. Which is good considering it has the "exit if non-interactive" statement.

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

From 0a278853a0b9b33082a8d3164424e8b7d1abb7dd Mon Sep 17 00:00:00 2001
From: angryrectangle <angryrectangle@cock.li>
Date: Sat, 12 Mar 2022 15:28:15 -0500
Subject: [PATCH] home: services: Fix bash aliases without guix-defaults.

* gnu/home/services/shells.scm: Fix bash aliases not being added if
  guix-defaults? was #f. Also fix inaccuracy in documentation about placement
  of defaults.
---
 gnu/home/services/shells.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/home/services/shells.scm b/gnu/home/services/shells.scm
index ca7f4ac0ad..9a79db484a 100644
--- a/gnu/home/services/shells.scm
+++ b/gnu/home/services/shells.scm
@@ -324,7 +324,7 @@ (define-configuration home-bash-configuration
   (guix-defaults?
    (boolean #t)
    "Add sane defaults like reading @file{/etc/bashrc} and coloring the output of
-@command{ls} to the end of the @file{.bashrc} file.")
+@command{ls} to the top of the @file{.bashrc} file.")
   (environment-variables
    (alist '())
    "Association list of environment variables to set for the Bash session.  The
@@ -448,7 +448,7 @@ (define (add-bash-configuration config)
               'bashrc
               (if (home-bash-configuration-guix-defaults? config)
                   (list (serialize-field 'aliases) guix-bashrc)
-                  (list (serialize-field 'alises))))
+                  (list (serialize-field 'aliases))))
              (file-if-not-empty 'bash-logout)))))
 
 (define (add-bash-packages config)
-- 
2.34.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [bug#54356] [PATCH] home: services: Fix bash aliases without guix-defaults.
  2022-03-12 20:53 [bug#54356] [PATCH] home: services: Fix bash aliases without guix-defaults angry rectangle
@ 2022-03-12 22:05 ` angry rectangle
  2022-03-18 14:02   ` bug#54356: " Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: angry rectangle @ 2022-03-12 22:05 UTC (permalink / raw)
  To: 54356

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

Oops, the patch was wrapped. I'll try again.
If this doesn't work, the original patch can be fixed by removing the ">" and moving the "of" that's on its own line to the previous one.

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

From 0a278853a0b9b33082a8d3164424e8b7d1abb7dd Mon Sep 17 00:00:00 2001
From: angryrectangle <angryrectangle@cock.li>
Date: Sat, 12 Mar 2022 15:28:15 -0500
Subject: [PATCH] home: services: Fix bash aliases without guix-defaults.

* gnu/home/services/shells.scm: Fix bash aliases not being added if
  guix-defaults? was #f. Also fix inaccuracy in documentation about placement
  of defaults.
---
 gnu/home/services/shells.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/home/services/shells.scm b/gnu/home/services/shells.scm
index ca7f4ac0ad..9a79db484a 100644
--- a/gnu/home/services/shells.scm
+++ b/gnu/home/services/shells.scm
@@ -324,7 +324,7 @@ (define-configuration home-bash-configuration
   (guix-defaults?
    (boolean #t)
    "Add sane defaults like reading @file{/etc/bashrc} and coloring the output of
-@command{ls} to the end of the @file{.bashrc} file.")
+@command{ls} to the top of the @file{.bashrc} file.")
   (environment-variables
    (alist '())
    "Association list of environment variables to set for the Bash session.  The
@@ -448,7 +448,7 @@ (define (add-bash-configuration config)
               'bashrc
               (if (home-bash-configuration-guix-defaults? config)
                   (list (serialize-field 'aliases) guix-bashrc)
-                  (list (serialize-field 'alises))))
+                  (list (serialize-field 'aliases))))
              (file-if-not-empty 'bash-logout)))))
 
 (define (add-bash-packages config)
-- 
2.34.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* bug#54356: [PATCH] home: services: Fix bash aliases without guix-defaults.
  2022-03-12 22:05 ` angry rectangle
@ 2022-03-18 14:02   ` Ludovic Courtès
  0 siblings, 0 replies; 3+ messages in thread
From: Ludovic Courtès @ 2022-03-18 14:02 UTC (permalink / raw)
  To: angry rectangle; +Cc: 54356-done

Hi,

angry rectangle <angryrectangle@cock.li> skribis:

>>From 0a278853a0b9b33082a8d3164424e8b7d1abb7dd Mon Sep 17 00:00:00 2001
> From: angryrectangle <angryrectangle@cock.li>
> Date: Sat, 12 Mar 2022 15:28:15 -0500
> Subject: [PATCH] home: services: Fix bash aliases without guix-defaults.
>
> * gnu/home/services/shells.scm: Fix bash aliases not being added if
>   guix-defaults? was #f. Also fix inaccuracy in documentation about placement
>   of defaults.

Good catch!  I applied it and fixed the same string in doc/guix.texi.

Thanks,
Ludo’.




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-03-18 14:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-12 20:53 [bug#54356] [PATCH] home: services: Fix bash aliases without guix-defaults angry rectangle
2022-03-12 22:05 ` angry rectangle
2022-03-18 14:02   ` bug#54356: " Ludovic Courtès

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.