~geb/numen

3 2

$XDG_CONFIG_HOME/numen/phrases completely overrides /etc/numen

Details
Message ID
<trinity-2d0340b1-6272-4048-9863-e82602fa5b73-1709580676759@3c-app-mailcom-lxa14>
DKIM signature
pass
Download raw message
Hi,
I just learned, if there's even a single file in $XDG_CONFIG_HOME/numen/phrases/, everything in /etc/numen/phrases is ignored. I see why this is necessary to avoid picking up definitions from both locations and possibly getting conflicts, but it wasn't obvious at a first reading of the manpage. Knowing this now, it does describe this correctly but perhaps not as clearly as it could ?

Here's an attempt at rewriting the "With no arguments ...." paragraph of the DESCRIPTION section :

#
By default, numen uses the phrase files in /etc/numen/phrases/ . If there are files in $XDG_CONFIG_HOME/numen/phrases/ , these will be loaded instead of the default set.  ($XDG_CONFIG_HOME is usually ~/.config)
#

Feel free to use or not, it's not a major problem.

Looking forward to using numen more. Thanks !
Details
Message ID
<CZLBXUQ972RE.OYTST015VJ2B@johngebbie.com>
In-Reply-To
<trinity-2d0340b1-6272-4048-9863-e82602fa5b73-1709580676759@3c-app-mailcom-lxa14> (view parent)
DKIM signature
pass
Download raw message
Hi fenugrec, maybe not clarifying the overriding as much as you'd like,
but I think I might change it to:

*numen* uses the default phrases unless given files as arguments, or there
are files ending with *.phrases* in your *$XDG_CONFIG_HOME/numen/phrases/*
directory. The default phrases can be found in the */etc/numen/phrases/*
directory, but should not be edited! (*$XDG_CONFIG_HOME* is *~/.config*
unless set otherwise.)

I'm trying to also cover that you can specify files with the command-line
arguments, and you shouldn't be editing the system-wide phrases that get
replaced on reinstall/update.

Thanks!
Details
Message ID
<trinity-98477589-8b88-4c8f-af39-41a221b4f606-1709595818226@3c-app-mailcom-lxa14>
In-Reply-To
<CZLBXUQ972RE.OYTST015VJ2B@johngebbie.com> (view parent)
DKIM signature
pass
Download raw message
Hi John,

sure, that would work.

Regarding the recommendation to not edit the copies in /etc however, I think an alternate solution would be to follow a common pattern of FHS :

" Any program or package which contains or requires data that doesn't need to be modified should store that data in /usr/share "
" /etc : Host-specific system configuration"
(https://refspecs.linuxfoundation.org/FHS_3.0/fhs)

and thus, the order of precendence would be :
- /usr/share/numen readonly, modified only when package is updated
- /etc/numen for cases where a system-wide configuration is desirable; package doesn't install anything there
- $XDG_CONFIG_HOME/.config/numen.... for per-user configs
- arguments

But, that is a bit of scope creep maybe.
Details
Message ID
<CZLSNTESUE2E.ZK0C6AZD0YK9@johngebbie.com>
In-Reply-To
<trinity-98477589-8b88-4c8f-af39-41a221b4f606-1709595818226@3c-app-mailcom-lxa14> (view parent)
DKIM signature
pass
Download raw message
I like the /usr/share suggestion! Recently someone on the chat said they
lost changes due to /etc/numen being overwritten, which I hadn't thought
enough about before.

The transition would be slightly bumpy, with old installed
/etc/numen taking precedence over it, and I know at least
https://github.com/anpandey/numen-nix/blob/master/flake.nix would need
paths updated, but it would probably be worth it.
Reply to thread Export thread (mbox)