Skip to content

Sort the options in --help alphabetically - #1043

Closed
VXNCXNX wants to merge 2 commits into
Wilfred:masterfrom
VXNCXNX:fix/sort-help-options
Closed

Sort the options in --help alphabetically#1043
VXNCXNX wants to merge 2 commits into
Wilfred:masterfrom
VXNCXNX:fix/sort-help-options

Conversation

@VXNCXNX

@VXNCXNX VXNCXNX commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

Split out of #1041, as you asked.

What's broken

difft --help lists options in declaration order, so related flags are scattered and there is no way to scan for one by name.

The fix

next_display_order(None) tells clap to sort them alphabetically. One line, no behaviour change beyond the help output.

Verification

cargo build and difft --help show the options sorted. cargo test passes.

When difftastic is given a single file, the error message did not say
which file was inspected or why it was rejected. Name the file and
state that it contains no conflict markers.

Closes Wilfred#764

Written with AI assistance (Claude Code); I have read the change and am accountable for it.
The options were listed in declaration order, which is essentially
arbitrary. Ask clap to sort them alphabetically instead.

Closes Wilfred#830

Written with AI assistance (Claude Code); I have read the change and am accountable for it.
@VXNCXNX

VXNCXNX commented Aug 15, 2026

Copy link
Copy Markdown
Contributor Author

Closing in favour of #1044, which is the same change branched cleanly off master.

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.

1 participant