all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#67652: Guix home - bash alias declarations order
@ 2023-12-05 15:54 Atte Torri via Bug reports for GNU Guix
  2023-12-06 21:11 ` Christian Miller via Bug reports for GNU Guix
  2024-02-22  4:10 ` bug#67652: [PATCH] * home/services/shells.scm (add-bash-configuration): reorder aliases (Bug#67652) Jason
  0 siblings, 2 replies; 4+ messages in thread
From: Atte Torri via Bug reports for GNU Guix @ 2023-12-05 15:54 UTC (permalink / raw)
  To: 67652

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

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@universite-paris-saclay.fr | 0169153106 

[-- Attachment #2: Type: text/html, Size: 6065 bytes --]

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

* bug#67652: Guix home - bash alias declarations order
  2023-12-05 15:54 bug#67652: Guix home - bash alias declarations order Atte Torri via Bug reports for GNU Guix
@ 2023-12-06 21:11 ` Christian Miller via Bug reports for GNU Guix
  2024-02-22  4:10 ` bug#67652: [PATCH] * home/services/shells.scm (add-bash-configuration): reorder aliases (Bug#67652) Jason
  1 sibling, 0 replies; 4+ messages in thread
From: Christian Miller via Bug reports for GNU Guix @ 2023-12-06 21:11 UTC (permalink / raw)
  To: 67652

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




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

* bug#67652: [PATCH] * home/services/shells.scm (add-bash-configuration): reorder aliases (Bug#67652)
  2023-12-05 15:54 bug#67652: Guix home - bash alias declarations order Atte Torri via Bug reports for GNU Guix
  2023-12-06 21:11 ` Christian Miller via Bug reports for GNU Guix
@ 2024-02-22  4:10 ` Jason
  2024-03-27 14:50   ` Hilton Chain via Bug reports for GNU Guix
  1 sibling, 1 reply; 4+ messages in thread
From: Jason @ 2024-02-22  4:10 UTC (permalink / raw)
  To: guix-patches; +Cc: Jason Darby

From: Jason Darby <jasonkdarby@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





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

* bug#67652: [PATCH] * home/services/shells.scm (add-bash-configuration): reorder aliases (Bug#67652)
  2024-02-22  4:10 ` bug#67652: [PATCH] * home/services/shells.scm (add-bash-configuration): reorder aliases (Bug#67652) Jason
@ 2024-03-27 14:50   ` Hilton Chain via Bug reports for GNU Guix
  0 siblings, 0 replies; 4+ messages in thread
From: Hilton Chain via Bug reports for GNU Guix @ 2024-03-27 14:50 UTC (permalink / raw)
  To: Jason; +Cc: 67652-done, Atte Torri, Christian Miller

Hi everyone,

On Thu, 22 Feb 2024 12:10:15 +0800,
Jason wrote:
>
> From: Jason Darby <jasonkdarby@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!




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

end of thread, other threads:[~2024-03-27 14:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-05 15:54 bug#67652: Guix home - bash alias declarations order Atte Torri via Bug reports for GNU Guix
2023-12-06 21:11 ` Christian Miller via Bug reports for GNU Guix
2024-02-22  4:10 ` bug#67652: [PATCH] * home/services/shells.scm (add-bash-configuration): reorder aliases (Bug#67652) Jason
2024-03-27 14:50   ` Hilton Chain via Bug reports for GNU Guix

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.