unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Richard Sent <richard@freakingpenguin.com>
To: "Brennan Vincent" <brennan@umanwizard.com>
Cc: guix-devel@gnu.org
Subject: Re: Configuring aliases in bashrc with guix home
Date: Sun, 13 Oct 2024 17:07:14 -0400	[thread overview]
Message-ID: <87jzebsoe5.fsf@freakingpenguin.com> (raw)
In-Reply-To: <87msjjdh46.fsf@denver.mail-host-address-is-not-set> (Brennan Vincent's message of "Fri, 04 Oct 2024 16:26:17 +0100")

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	other threads:[~2024-10-13 21:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-04 15:26 Configuring aliases in bashrc with guix home Brennan Vincent
2024-10-13 21:07 ` Richard Sent [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87jzebsoe5.fsf@freakingpenguin.com \
    --to=richard@freakingpenguin.com \
    --cc=brennan@umanwizard.com \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).