feat: Add shell completion and refactor report command options#2
Merged
romamo merged 3 commits intoromamo:mainfrom Mar 2, 2026
Merged
feat: Add shell completion and refactor report command options#2romamo merged 3 commits intoromamo:mainfrom
romamo merged 3 commits intoromamo:mainfrom
Conversation
Add argcomplete integration and completion behavior for core command flow, including basic context-aware suggestions for report arguments and file option suppression in completion.
Convert report types to true subcommands with aliases. Scope audit-only options to the audit subcommand so help and completion only show relevant flags.
romamo
approved these changes
Mar 2, 2026
Owner
romamo
left a comment
There was a problem hiding this comment.
LGTM, documentation is solid too.
This file contains hidden or 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
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.
This PR adds tab completion support and adjusts report command structure
to scope options correctly. The completion covers all the basic commands
and subcommands, and in addition some special cases like the currency for
bean report audit. More special handling for e.g. completion for accountnames can be added later on. If the ledger specific completions turn out
to be too slow, then some sort of (disk) cache could be added.
The PR also includes a bit of refactoring for the report subcommands. This
allowed for easier completion logic and also made the
auditspecific flagseasier to understand. Also added minimal explanation into the helps.