Could this be extended to support reading from system-wide directories (e.g. /usr/share/nushell and /etc/nushell) and then have the user configurations overlaid on top? This is similar to how other shells put global config files in /etc/ and then have the user settings applied on top, potentially overriding the system config.
It will make it easier in Fedora to recommend other tools that already ship completions for other shells to ship completions for nushell as well in a consistent way.
Describe the solution you'd like
Have new directories defined as, e.g., $nu.system-data-dir and $nu.system-config-dir and have the default environment source those before sourcing the per-user config and data directories
Describe alternatives you've considered
We could just implement this downstream, but seems like it would cause more work both to maintain and if upstream nushell ends up implementing something different
Additional context and details
For Fedora, once upstream Nushell developers have decided on where the system directories should be (if they should exist at all), we can start the process on getting them added to the base filesystem package and the macros added to redhat-rpm-config so other packages can easily drop files into these
Related problem
Right now both
$nu.default-config-dir
and$nu.data-dir
point to local directories under the user's home directorye.g. on Fedora
See e.g. https://github.com/nushell/nushell/blob/main/crates/nu-utils/src/sample_config/default_env.nu#L80
Could this be extended to support reading from system-wide directories (e.g. /usr/share/nushell and /etc/nushell) and then have the user configurations overlaid on top? This is similar to how other shells put global config files in /etc/ and then have the user settings applied on top, potentially overriding the system config.
It will make it easier in Fedora to recommend other tools that already ship completions for other shells to ship completions for nushell as well in a consistent way.
Describe the solution you'd like
Have new directories defined as, e.g.,
$nu.system-data-dir
and$nu.system-config-dir
and have the default environment source those before sourcing the per-user config and data directoriesDescribe alternatives you've considered
We could just implement this downstream, but seems like it would cause more work both to maintain and if upstream nushell ends up implementing something different
Additional context and details
For Fedora, once upstream Nushell developers have decided on where the system directories should be (if they should exist at all), we can start the process on getting them added to the base
filesystem
package and the macros added toredhat-rpm-config
so other packages can easily drop files into these