1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-27 11:07:44 +00:00

coreutils multicall: Sort the command by alphabetic order (for the man)

This commit is contained in:
Sylvestre Ledru 2023-07-17 22:34:03 +02:00
parent ec1d2fba33
commit 7d44e96713

View file

@ -38,14 +38,14 @@ pub fn main() {
let mut mf = File::create(Path::new(&out_dir).join("uutils_map.rs")).unwrap(); let mut mf = File::create(Path::new(&out_dir).join("uutils_map.rs")).unwrap();
mf.write_all( mf.write_all(
"type UtilityMap<T> = phf::Map<&'static str, (fn(T) -> i32, fn() -> Command)>;\n\ "type UtilityMap<T> = phf::OrderedMap<&'static str, (fn(T) -> i32, fn() -> Command)>;\n\
\n\ \n\
fn util_map<T: uucore::Args>() -> UtilityMap<T> {\n" fn util_map<T: uucore::Args>() -> UtilityMap<T> {\n"
.as_bytes(), .as_bytes(),
) )
.unwrap(); .unwrap();
let mut phf_map = phf_codegen::Map::<&str>::new(); let mut phf_map = phf_codegen::OrderedMap::<&str>::new();
for krate in &crates { for krate in &crates {
let map_value = format!("({krate}::uumain, {krate}::uu_app)"); let map_value = format!("({krate}::uumain, {krate}::uu_app)");
match krate.as_ref() { match krate.as_ref() {