Skip to content

feat: Add shell completion and refactor report command options#2

Merged
romamo merged 3 commits intoromamo:mainfrom
klaander:add-tab-completion
Mar 2, 2026
Merged

feat: Add shell completion and refactor report command options#2
romamo merged 3 commits intoromamo:mainfrom
klaander:add-tab-completion

Conversation

@klaander
Copy link
Contributor

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 account
names 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 audit specific flags
easier to understand. Also added minimal explanation into the helps.

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.
Copy link
Owner

@romamo romamo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, documentation is solid too.

@romamo romamo merged commit c96da28 into romamo:main Mar 2, 2026
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.

3 participants