-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
Problem
Running hunk with no subcommand currently prints the top-level help text instead of launching the app.
For interactive use, that makes the common path feel heavier than it should be. Users naturally expect bare hunk to open the default review UI.
Current behavior
This is currently intentional and covered by tests:
src/core/cli.tsparseCli()returns{ kind: "help" }when there is no command name
test/cli.test.tsprints help when no subcommand is passed
test/startup.test.tsreturns help output without entering app startup
Desired behavior
When invoked interactively with no subcommand, hunk should launch the app instead of printing help.
A reasonable default would be equivalent to hunk diff.
Open questions
- Outside a Git repo, should bare
hunk:- show a friendly repo error,
- fall back to help,
- or offer a more guided message?
- If stdin is piped, should the existing pager/patch detection still take precedence? (Probably yes.)
- Should this only apply in interactive TTY mode, while non-interactive invocations keep the current help behavior?
Acceptance criteria
hunkin an interactive repo-backed shell launches the main app.hunk --helpstill prints help.- Existing stdin-backed pager / patch startup behavior remains unchanged.
- The behavior outside a repo is explicit and friendly.
- Update CLI/startup tests to encode the new default.
Notes
This is a CLI ergonomics change, but it also affects documentation and onboarding. If shipped, README/help examples should make the new default path obvious.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels