GNU bug report logs - #67652
Guix home - bash alias declarations order

Previous Next

Package: guix;

Reported by: Atte Torri <atte.torri <at> universite-paris-saclay.fr>

Date: Tue, 5 Dec 2023 23:58:01 UTC

Severity: normal

Done: Hilton Chain <hako <at> ultrarare.space>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 67652 in the body.
You can then email your comments to 67652 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#67652; Package guix. (Tue, 05 Dec 2023 23:58:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Atte Torri <atte.torri <at> universite-paris-saclay.fr>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Tue, 05 Dec 2023 23:58:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Atte Torri <atte.torri <at> universite-paris-saclay.fr>
To: bug-guix <at> gnu.org
Subject: Guix home - bash alias declarations order
Date: Tue, 5 Dec 2023 16:54:10 +0100 (CET)
[Message part 1 (text/plain, inline)]
Hello, 

I have an issue with guix home alias declarations. The aliases I declare in my home configuration always end up on top of the .bashrc file, while the documentation for the home-bash-service-type says "The aliases will be defined after the contents of the bashrc field has been put in the .bashrc file.". The following is the bash configuration I use 

(service home-bash-service-type 
(home-bash-configuration 
(bashrc (list (local-file ".bashrc" "bashrc"))) 
(bash-profile (list (local-file ".bash_profile" "bash_profile"))) 
(bash-logout (list (local-file ".bash_logout" "bash_logout"))) 
(aliases '(("egrep" . "egrep --color=auto") 
("fgrep" . "fgrep --color=auto") 
("grep" . "grep --color=auto") 
("l" . "ls -CF") 
("la" . "ls -A") 
("ll" . "ls -alF") 
("ls" . "ls --color=auto"))))) 


M. TORRI Atte 
PhD Student (Computer Science) at Université Paris-Saclay 
Doctorant (Informatique) à l'Université Paris-Saclay 
Équipe ParSys - Laboratoire Interdisciplinaire des Sciences du Numérique (LISN) 
Bureau 105 - Bâtiment 650 
atte.torri <at> universite-paris-saclay.fr | 0169153106 
[Message part 2 (text/html, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#67652; Package guix. (Wed, 06 Dec 2023 23:13:03 GMT) Full text and rfc822 format available.

Message #8 received at 67652 <at> debbugs.gnu.org (full text, mbox):

From: Christian Miller <christian.miller <at> dadoes.de>
To: 67652 <at> debbugs.gnu.org
Subject: Guix home - bash alias declarations order
Date: Wed, 06 Dec 2023 22:11:57 +0100
Hi,

I have the same issue since I started using Guix home.  Therefore I
did this:

--8<---------------cut here---------------start------------->8---
(service home-bash-service-type
	 (home-bash-configuration
	  (guix-defaults? #f)
	  ;; Needs to be done since aliases are put on top and
	  ;; would be overwritten by `guix-default`.
	  (bashrc (list (plain-file "default-bashrc" %default-bashrc)))
	  (aliases '(("ls" . "ls -lah --color")
		     ("grep" . "grep --color")))))
--8<---------------cut here---------------end--------------->8---

Disabling "guix-defaults" and now you aliases should be at the bottom
and work.
-- 
Christian Miller




Information forwarded to , bug-guix <at> gnu.org:
bug#67652; Package guix. (Thu, 22 Feb 2024 05:16:01 GMT) Full text and rfc822 format available.

Message #11 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Jason <jasonkdarby <at> gmail.com>
To: guix-patches <at> gnu.org
Cc: Jason Darby <jasonkdarby <at> gmail.com>
Subject: [PATCH] * home/services/shells.scm (add-bash-configuration): reorder
 aliases (Bug#67652)
Date: Wed, 21 Feb 2024 23:10:15 -0500
From: Jason Darby <jasonkdarby <at> gmail.com>

Change-Id: I288856bb6befe378ca60ef78578acc069cb18532
---
 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 db82a7cff3..8fd1668b59 100644
--- a/gnu/home/services/shells.scm
+++ b/gnu/home/services/shells.scm
@@ -429,8 +429,8 @@ (define (add-bash-configuration config)
      ,@(list (file-if-not-empty
               'bashrc
               (if (home-bash-configuration-guix-defaults? config)
-                  (list (serialize-field 'aliases)
-                        (plain-file-content %default-bashrc))
+                  (list (plain-file-content %default-bashrc)
+                        (serialize-field 'aliases))
                   (list (serialize-field 'aliases))))
              (file-if-not-empty 'bash-logout)))))
 

base-commit: 8073a26022111c38808c1a803d59229288db0839
-- 
2.41.0





Reply sent to Hilton Chain <hako <at> ultrarare.space>:
You have taken responsibility. (Wed, 27 Mar 2024 14:54:09 GMT) Full text and rfc822 format available.

Notification sent to Atte Torri <atte.torri <at> universite-paris-saclay.fr>:
bug acknowledged by developer. (Wed, 27 Mar 2024 14:54:09 GMT) Full text and rfc822 format available.

Message #16 received at 67652-done <at> debbugs.gnu.org (full text, mbox):

From: Hilton Chain <hako <at> ultrarare.space>
To: Jason <jasonkdarby <at> gmail.com>
Cc: 67652-done <at> debbugs.gnu.org,
 Atte Torri <atte.torri <at> universite-paris-saclay.fr>,
 Christian Miller <christian.miller <at> dadoes.de>
Subject: Re: bug#67652: [PATCH] * home/services/shells.scm
 (add-bash-configuration): reorder aliases (Bug#67652)
Date: Wed, 27 Mar 2024 22:50:25 +0800
Hi everyone,

On Thu, 22 Feb 2024 12:10:15 +0800,
Jason wrote:
>
> From: Jason Darby <jasonkdarby <at> gmail.com>
>
> Change-Id: I288856bb6befe378ca60ef78578acc069cb18532
> ---
>  gnu/home/services/shells.scm | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

I have applied Jason's patch as 0b38c9401bebb6b87093555ef3768a8e1855c938, thank
you all!




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 25 Apr 2024 11:25:52 GMT) Full text and rfc822 format available.

This bug report was last modified 9 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.