1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-30 12:37:49 +00:00

coreutils multicall: the manpage subcommand doesn't display the right command

see https://manpages.debian.org/unstable/rust-coreutils/rust-coreutils.1.en.html
This commit is contained in:
Sylvestre Ledru 2023-07-17 22:40:54 +02:00
parent 7d44e96713
commit 83c8517142

View file

@ -212,8 +212,15 @@ fn gen_manpage<T: uucore::Args>(
fn gen_coreutils_app<T: uucore::Args>(util_map: &UtilityMap<T>) -> Command { fn gen_coreutils_app<T: uucore::Args>(util_map: &UtilityMap<T>) -> Command {
let mut command = Command::new("coreutils"); let mut command = Command::new("coreutils");
for (_, (_, sub_app)) in util_map { for (name, (_, sub_app)) in util_map {
command = command.subcommand(sub_app()); // Recreate a small subcommand with only the relevant info
// (name & short description)
let about = sub_app()
.get_about()
.expect("Could not get the 'about'")
.to_string();
let sub_app = Command::new(name).about(about);
command = command.subcommand(sub_app);
} }
command command
} }