Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Project level default configuration should be possible without user intervention #2194

Copy link
Copy link

Description

@alerque
Issue body actions

I've seen #1013 and that covers some of my issue, but the scope is still not right, so here I am...

I've just setup a couple more projects using plain text accounting and am now pretty aggravated with needing different commands for the same workflow in different projects.

Out of the box hledger has a user oriented scope. It assumes that the user is going to be doing one thing with their journals no matter where they call it from. This is strongly reflected in the LEDGER_FILE default walue that is relative to the $HOME directory. Instead of using the current directory and moving up the tree looking for a project root, then eventually stopping on the user directory if reached, it jumps straight to taking it's queues from the $USER. This might be convenient for some folks, but not for me. All my PTA projects are in specific directories and tracked as Git repositories.

When you run git diff, you expect it to operate in the current project, using setting first from .git/config and then falling back to ~/.gitconfig and /etc/.... I have some project with specific filters that help process files into a format that can be diffed, e.g. for diffing binary file types using speciall tooling. It doesn't matter what project I clone or what system I do it on, git diff comes ready to run for that project.

Not so with hledger that at the very least needs to have a file name specified via -f. I tried for a while to try to keep the main entry point ledger for all projects named the same thing so I could alias hledger='hledger -f main.ledger', but working with projects in other languages that has proved unattainable. There are solutions such as .env files and various utilities to load environment variables per project, but this requires all users of the project to use the same tooling in their shell (and that typically affects other projects). I've event tried setting up all projects with similar arg file sets, but again this just doesn't always work out.

It would be really nice if there was some file that could be placed in a project that would be found by ledger to at least set a default LEDGER_FILE. Perhaps this could be a default args file that is read that could include -f=filename.ledger perhaps other args.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-WISHSome kind of improvement request or proposal.Some kind of improvement request or proposal.cliCommand line parsing, options, arguments and suchlike.Command line parsing, options, arguments and suchlike.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.