[neomutt-users] dereference SYSCONFDIR in neomuttrc?

Richard Russon rich at flatcap.org
Wed Jun 28 17:40:16 CEST 2023


Hi Ulli,

> SYSCONFDIR="/sw/ubuntu-22.04/neomutt-20230517/etc"

That's defined as part of the build process.
It appears a few times in the code as a default location to find files.
Unfortunately, it's not exposed to the user (except in the version)

  neomutt -v | grep SYSCONFDIR

> I have added extra config files in SYSCONFDIR.
> How can I access them via neomuttrc?

A simple way is to modify the neomuttrc in _that_ directory.
If you simply:

  source x.rc

(without a path) NeoMutt will try to find `x.rc` in the same directory.

> source $SYSCONFDIR/x.rc

or you could extract the directory using scripting:

  neomutt -v | sed -n '/SYSCONFDIR/s/^/export NEOMUTT_/p'

outputs:

  export NEOMUTT_SYSCONFDIR="/sw/ubuntu-22.04/neomutt-20230517/etc"

Then you could configure:

  source "$NEOMUTT_SYSCONFDIR/x.rc"

Hope this helps,
    FlatCap / Rich

---

# Don't print any output
sed -n

# Only match lines containing SYSCONFDIR
/SYSCONFDIR/

# Search and replace
# ^ (beginning of the line)
s/^/export NEOMUTT_/

# Print the result
p
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://mailman.neomutt.org/pipermail/neomutt-users-neomutt.org/attachments/20230628/5adeadff/attachment.sig>


More information about the neomutt-users mailing list