Hi Brennan,

> If the user wants to remove all the aliases from %default-bashrc and
> set her own, she can run `unalias -a` in her own bashrc first. But
> then she can't use the user-defined aliases mechanism from
> home-bash-configuration, since that is added to the file before the
> user-defined bashrc.

Correct me if I'm wrong, but aliases can be overwritten, no? A user who
wants %default-bashrc but without aliases can redefine any aliases they
prefer in the aliases section and unalias the rest individually at the
end. A bit unwieldy perhaps, but not unreasonable in my opinion when
there's only 4 aliases.

> My suggestion is that when aliases is set in home-bash-configuration,
> we remove the predefined default aliases from %default-bashrc. Or at
> least provide an option to do so.

I'm not a fan of removing it by default, among other reasons because it
would silently break existing setups and the current behavior is
documented.

Perhaps instead %default-bashrc can be broken down into sections and
users can enable/disable parts of it piecemeal, e.g.

--8<---------------cut here---------------start------------->8---
(guix-bashrc-defaults
 ;; default #t for most fields
 (aliases? #f)
 ;; (source-system? #t)
 ;; (sane-ssh? #t)
 (prompt? #f))
--8<---------------cut here---------------end--------------->8---

This could allow for a more comprehensive and opinionated default bashrc
to be packaged with Guix while still maintaining user control.

-- 
Take it easy,
Richard Sent
Making my computer weirder one commit at a time.

Reply via email to