Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFE: Support environment variables in include directives #2310

Open
larsks opened this issue Dec 31, 2024 · 2 comments
Open

RFE: Support environment variables in include directives #2310

larsks opened this issue Dec 31, 2024 · 2 comments
Labels
A-WISH Some kind of improvement request, hare-brained proposal, or plea. journal The journal file format, and its features.

Comments

@larsks
Copy link
Contributor

larsks commented Dec 31, 2024

For managing a hierarchy of accounts and rules files, it would be great if I could do something like:

include $COMMON_RULES_FILE

Instead of:

include ../../../common.rules

Because a relative path like ../../../common.rules is fragile when things get moved around.

@simonmichael simonmichael added A-WISH Some kind of improvement request, hare-brained proposal, or plea. journal The journal file format, and its features. labels Dec 31, 2024
@the-solipsist
Copy link
Collaborator

What advantage is there in using $COMMON_RULES_FILE (which will after all need to be changed each time you change the location of the common rules file) over an absolute path for the file, e.g., /home/sol/accounts/meta.journal ?

@simonmichael
Copy link
Owner

Just another related idea, what if $HLEDGER_DIR was special, and include looked under there as a fallback ? I was wanting HLEDGER_DIR for some other reason as well.

The downside is more magical behaviour, more complication, more ways for it to go wrong. Environment variables are notoriously not always there when you want them, and hard for non-experts to configure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-WISH Some kind of improvement request, hare-brained proposal, or plea. journal The journal file format, and its features.
Projects
None yet
Development

No branches or pull requests

3 participants