bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bash support for XDG Base Directory spec (~/.config/bash/)


From: Robert Elz
Subject: Re: bash support for XDG Base Directory spec (~/.config/bash/)
Date: Wed, 03 Nov 2021 23:24:21 +0700

    Date:        Wed, 3 Nov 2021 10:35:09 -0400
    From:        Chet Ramey <chet.ramey@case.edu>
    Message-ID:  <3f617355-cbd2-1e62-358e-dbf9487ce740@case.edu>


  | The OP assumes that the value of this functionality is self-evident. I'm
  | a little more skeptical. How does it help make things easier for users?

I do something similar (without changing bash ...) using ~/.d as the place
to put my config files.   I like it as it keeps my $HOME cleaner (not full
of zillions of config and related files for everything in the universe).

  | If someone wants to keep their config files in ~/.config/bash, what is
  | wrong with using symlinks from ~/.bash_profile and ~/.bashrc to those
  | files?

That is what I do for some programs which for one reason or other are forced
to keep config files in $HOME/.xxx (POSIX mandates $HOME/.profile for
example).   It all works just fine.

For .bash_profile and .bashrc I do something slightly different:

jinx$ cat .bash_profile
test -r "$HOME/.d/profile" && . "$HOME/.d/profile"
jinx$ cat .bashrc
test -r "$HOME/.d/bashrc" && . "$HOME/.d/bashrc"

(.d/profile is set up to work with bash, and other shells).

Using a symlink (which I do for some other setup files:

lrwxr-xr-x   1 kre  wheel     14 Sep 30  2020 .blackboxrc -> .d/blackbox/rc
lrwxr-xr-x   1 kre  wheel     18 Nov 18  2018 .cvsrc -> /home/kre/.d/cvsrc

(etc)

or using a simple one liner in $HOME which references the "real" one
elsewhere works just fine.    Unfortunately my $HOME is still not as
clean as I'd like (but many of those files reference others, and none
of them have any presence in $HOME at all).

kre




reply via email to

[Prev in Thread] Current Thread [Next in Thread]