You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
simonmichael opened this issue
Sep 13, 2024
· 2 comments
Labels
A-BUGSomething wrong, confusing or sub-standard in the software, docs, or user experience.cliCommand line parsing, options, arguments and suchlike.docsDocumentation-related.impact3Affects just a few users.severity2Minor to moderate usability/doc bug, reasonably easy to avoid or tolerate.
When a command argument is not provided on the command line, but in the general section of a config file, I expected that it would be used as the command, but is not; rather it is ignored. (Reported by sol in chat.)
CLI parsing is already complicated, so implementing this is tricky. If it worked,
it would restrict hledger to that one command when using that config file
a command-specific config file section for that command would also take effect
any command-specific sections for other commands would be ignored.
As a workaround, you can achieve the same effect by making the config file a shebang script and adding the command argument to the shebang line.
But it may seem surprising/inconsistent that this doesn't work. We should implement it or document it.
The text was updated successfully, but these errors were encountered:
simonmichael
changed the title
a command argument in a config file's general section is not used
Providing the command argument in a config file's general section does not work
Sep 13, 2024
simonmichael
added
A-BUG
Something wrong, confusing or sub-standard in the software, docs, or user experience.
docs
Documentation-related.
cli
Command line parsing, options, arguments and suchlike.
severity2
Minor to moderate usability/doc bug, reasonably easy to avoid or tolerate.
impact3
Affects just a few users.
labels
Sep 13, 2024
simonmichael
changed the title
Providing the command argument in a config file's general section does not work
Providing the command argument from a config file does not work
Sep 13, 2024
A-BUGSomething wrong, confusing or sub-standard in the software, docs, or user experience.cliCommand line parsing, options, arguments and suchlike.docsDocumentation-related.impact3Affects just a few users.severity2Minor to moderate usability/doc bug, reasonably easy to avoid or tolerate.
When a command argument is not provided on the command line, but in the general section of a config file, I expected that it would be used as the command, but is not; rather it is ignored. (Reported by sol in chat.)
CLI parsing is already complicated, so implementing this is tricky. If it worked,
As a workaround, you can achieve the same effect by making the config file a shebang script and adding the command argument to the shebang line.
But it may seem surprising/inconsistent that this doesn't work. We should implement it or document it.
The text was updated successfully, but these errors were encountered: