Skip to content

Add --list flag to multicall binary - #668

Merged
sylvestre merged 1 commit into
uutils:mainfrom
jmr:list-utils
Oct 21, 2026
Merged

sylvestre merged 1 commit into
uutils:mainfrom
jmr:list-utils

Conversation

@jmr

@jmr jmr commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Add a --list option that prints all registered utility names, one per line. This matches the existing convention in uutils/coreutils and enables scripts to dynamically discover available utilities without hardcoding lists.

Update the usage text to document the new flag.

Comment thread tests/tests.rs
let stdout = String::from_utf8(out.stdout).unwrap();
let lines: Vec<&str> = stdout.lines().collect();
assert!(!lines.is_empty());
// Can be replaced with lines.is_sorted() starting with Rust 1.82.

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.

do we need this comment? :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Without it, someone will probably think, "this is silly, why don't we use is_sorted()?" then, change it and realize the rust version is too low. Having the comment let's us know when it's time to update this.

Comment thread tests/tests.rs Outdated
Add a --list option that prints all registered utility names, one per
line. This matches the existing convention in uutils/coreutils and
enables scripts to dynamically discover available utilities without
hardcoding lists.

Update the usage text to document the new flag.
Comment thread tests/tests.rs
assert!(out.status.success());
let stdout = String::from_utf8(out.stdout).unwrap();
let lines: Vec<&str> = stdout.lines().collect();
assert!(!lines.is_empty());

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This could fail if no features are enabled. Should I delete this or assume no one will test like that?

@sylvestre
sylvestre merged commit 1cad015 into uutils:main Oct 21, 2026
14 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.

2 participants