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

Added check to ignore --date-format option for hledger users #441

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

GLakovnik
Copy link

@GLakovnik GLakovnik commented Oct 31, 2024

This PR intends to improve ledger-mode compatibility for hledger users.
It requires no additional configuration and is completely invisible to ledger users while fixing the most common error hledger users see.

It's "the dumbest thing that works", a simple check whether ledger-binary-path points to hledger. If it does, ledger-exec-ledger does not include the --date-format option (which hledger doesn't have).

Solves the largest problem for hledger users and is a prerequisite for other improvements (WIP, i plan to make reconcilliation work as well and this is the first step.)
I've documented the incompatibilities in hledger's documentation.

With this change the following now works with hledger:
Quick balance display (<C-c> <C-p>)
Add transaction (<C-c> <C-a>)
Display ledger stats (<C-c> <C-l>)

@bcc32
Copy link
Collaborator

bcc32 commented Nov 15, 2024

Does hledger really not support setting a format for dates? I'd rather do something different than just "silently don't respect the customized value of --date-format" in that case---perhaps we could support setting ledger-default-date-format to nil, which hledger users would have to do?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants