-
-
Notifications
You must be signed in to change notification settings - Fork 306
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
Config file support #2206
Merged
Merged
Config file support #2206
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
And some refactoring of command line parsing code. General options only, in ./hledger.conf, for now.
It's clearer to write command-specific flags after the command name argument, but that's no longer required. (Writing non-builtin, addon-specific flags after -- is still required). Also, give up on "obey help/doc/version flags even if there's a bad command/flag", it's too hard to do well.
For brevity, and consistency with --conf. --rules-file remains supported, as a hidden option. hledger's main mode now supports the hidden legacy flags, as the command modes do.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A new config file system, to replace argument files and ad hoc shell aliases, as discussed at #1013.
Commits, oldest first:
f4c0d0b * feat: cli: basic config file support for hledger
cfd7e80 * dev: cli: refactor/clarify main procedure and command line processing
eeeb3c6 * imp: cli: allow command options to be written before the command also
3c7050f * dev: refactor: move emptyorcommentlinep'; hlint
895dbae * dev: refactor: merge Text.Megaparsec.Custom into Hledger.Utils.Parse
6add151 * ;cabal: update cabal files
a2ecd7e * feat: config file: add a real parser, support command-specific options
d93d97a * imp: move --debug to help flags, making it more universal
0cc2530 * feat: config file: ignore unsupported general options; refactor
e896ae5 * feat: config file: rename/update sample config
cee57ae * imp: TimedotReader: trace parsing at debug level 9
412a438 * dev: comment parsing tests/refactoring, fix indented timedot comments
2c14e89 * dev: refactor: cli main procedure
ba799c5 * fix: config file: pass only post-cmd and cmd-specific conf opts to addons
b5621e9 * fix: ui, web: accept valueless --debug flag again
485593d * fix: cli: don't let a valueless --debug flag eat the command name
a25f88d * fix: cli: ensureDebugFlagHasVal: fix multiple --debug flags not just one
ee669f4 * imp: config file: don't require -- before addon-specific opts
830a3d8 * imp: config file: also try home and XDG config dirs
a4aeb0a * imp: config file: also try parent dirs
c3e3a5b * imp: config file: --conf, --no-conf/-n, improve debug output
a2ea513 * imp: cli: rename --rules-file to --rules; tweak options help
91892d7 * ;doc: config files
489b6d8 * ;tools: Shake cmddocs: improve help
b218558 * ;doc: update help
3487e1c * doc: update manuals
b8e8a2a * ;doc: config files: edits
Doc: Config files
Example: hledger.conf.sample