Skip to content

diff: match GNU command-line error messages - #437

Open
draarivpatel-ui wants to merge 1 commit into
uutils:mainfrom
draarivpatel-ui:diff-usage-error-prefix
Open

draarivpatel-ui wants to merge 1 commit into
uutils:mainfrom
draarivpatel-ui:diff-usage-error-prefix

Conversation

@draarivpatel-ui

Copy link
Copy Markdown

GNU diff prefixes every command-line error with the program name and adds diff: Try 'diff --help' for more information. to usage errors. uutils printed the bare messages from parse_params, e.g. unrecognized option '--bogus'.

Errors raised while parsing options now go through a usage_error helper that produces the GNU two-line format (extra_operand already emitted it; it is now shared). Errors from -F pattern compilation keep only the prefix, as GNU does for fatal errors. Conflicting output style options is lowercased to GNU's conflicting output style options.

Closes #394

Copilot AI balanced review requested due to automatic review settings November 24, 2026 20:00

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

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.

diff - usage errors lack the diff: prefix and the "Try --help" line

2 participants