luaur_reduce_cli/functions/help.rs
1/// Source: `CLI/src/Reduce.cpp:476-481` (`help`).
2///
3/// C++:
4/// ```cpp
5/// printf("Syntax: %s script command \"search text\"\n", args[0].data());
6/// printf(" Within command, use {} as a stand-in for the script being reduced\n");
7/// exit(1);
8/// ```
9/// `args[0]` is the program name; print it directly (the C++ `string_view::data()`
10/// is the NUL-terminated `argv[0]`).
11pub fn help(args: &[&str]) -> ! {
12 let program_name = args.first().copied().unwrap_or("luaur-reduce");
13 println!("Syntax: {} script command \"search text\"", program_name);
14 println!(" Within command, use {{}} as a stand-in for the script being reduced");
15 std::process::exit(1);
16}