Skip to content

coreutils: recognize abbreviated help options - #15429

Merged
sylvestre merged 1 commit into
uutils:mainfrom
limadog9:fix/coreutils-abbreviated-help
Oct 17, 2026
Merged

sylvestre merged 1 commit into
uutils:mainfrom
limadog9:fix/coreutils-abbreviated-help

Conversation

@limadog9

Copy link
Copy Markdown
Contributor

Accept --h, --he, and --hel as abbreviations for --help. Preserve utility argument forwarding and rejection of invalid options.

Closes #10269.

Comment thread src/bin/coreutils.rs
}
// GNU coreutils --help string shows help for coreutils
if util == "--help" || util == "-h" {
if util == "-h" || (util.starts_with("--h") && "--help".starts_with(util)) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

what about --vers? it should probably be accepted too, like --version. should be a followup

@sylvestre
sylvestre merged commit 3679789 into uutils:main Oct 17, 2026
89 checks passed
@sylvestre

Copy link
Copy Markdown
Contributor

Thanks for your PR

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.

coreutils --hel does not work like --help while ls --hel does

2 participants