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

hledger run does not support arg files #2330

Open
Xitian9 opened this issue Feb 23, 2025 · 1 comment
Open

hledger run does not support arg files #2330

Xitian9 opened this issue Feb 23, 2025 · 1 comment

Comments

@Xitian9
Copy link
Collaborator

Xitian9 commented Feb 23, 2025

hledger run does not yet seem to properly parse argfiles. I would expect these two commands to produce the same results, but the second command does not display any accounts.

echo "--depth=1\nassets" > test.args

hledger balance @test.args
hledger run <<< "balance @test.args"
@adept
Copy link
Collaborator

adept commented Feb 23, 2025

Additional colour:

  • run uses getHledgerCliOpts' (see here) to parse [String] into CliOpts

  • getHledgerCliOpts' does not handle arg files, it assumes they were already interpolated by the toplevel Cli.hs here

  • expandArgsAt stops at '--' , so run needs to keep applying expandArgsAt itself inside each -- - separated block

adept added a commit to adept/hledger that referenced this issue Feb 23, 2025
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

No branches or pull requests

2 participants