bug-bash
[Top][All Lists]
Advanced

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

Re: [PATCH 9/9] variables: define default BASH_LIBRARIES_PATH


From: Koichi Murase
Subject: Re: [PATCH 9/9] variables: define default BASH_LIBRARIES_PATH
Date: Tue, 7 May 2024 19:38:16 +0900

2024年5月5日(日) 18:57 Matheus Afonso Martins Moreira
<matheus.a.m.moreira@gmail.com>:
> +/* The default value of the BASH_LIBRARIES_PATH variable
> +   which is used by source -l instead of PATH. */
> +#ifndef DEFAULT_LIBRARIES_PATH
> +#define DEFAULT_LIBRARIES_PATH \
> +  "~/.local/lib/bash:/usr/local/lib/bash:/usr/lib/bash"

I don't think `$prefix/lib' would be the appropriate place to put the
script files. /lib directory is traditionally intended for the
architecture-dependent binary libraries loaded by ld. All the other
resources independent of the architecture (and thus can be "shared")
can just be put in /share/bash/scripts or something.

Furthermore, the location overlaps with the loadable builtins, which
are not the script files intended to be sourced. You are mixing the
script file with the loadable builtins while trying to separate the
script files from the executable files. The same issue will arise in
another place.

https://lists.gnu.org/archive/html/bug-bash/2024-05/msg00090.html
2024年5月7日(火) 2:11 Matheus Afonso Martins Moreira <matheus@matheusmoreira.com>:
> > an incomplete support for the XDG base directories, which should
> > actually be discussed separately.
>
> XDG does not specify the ~/.local and ~/.local/lib directories.
> Only the XDG Data Directory defaults to ~/.local/share if unset.
> That implies a ~/.local directory tree that mirrors that of /usr.

This is the same as the argument for the long option. Why only
BASH_LIBRARIES_PATH (among the other similar variables) should honor
~/.local indirectly implied by XDG_DATA_HOME? In the current state of
Bash, any of the XDG user directories haven't been hard-coded. Also,
as you already know, the introduction of any XDG user directories is
one of the sensitive topics in the bug-bash list, so I believe it
should be discussed separately. It shouldn't slip into the codebase as
a part of another change.



reply via email to

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