From fb2d20e715dd04d27c4873c4989202133783f161 Mon Sep 17 00:00:00 2001 From: Miquel Sabaté Solà Date: Tue, 2 Sep 2025 07:29:24 +0200 Subject: Add -h and -v options on the help message MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On all binaries there were these two options missing from the help message. Signed-off-by: Miquel Sabaté Solà --- crates/nasm/src/main.rs | 2 ++ crates/readrom/src/main.rs | 4 +++- crates/xa65/src/main.rs | 4 +++- 3 files changed, 8 insertions(+), 2 deletions(-) (limited to 'crates') diff --git a/crates/nasm/src/main.rs b/crates/nasm/src/main.rs index 6ca6d27..9cc3049 100644 --- a/crates/nasm/src/main.rs +++ b/crates/nasm/src/main.rs @@ -26,9 +26,11 @@ fn print_help() { println!("Options:"); println!(" -c, --config \tLinker configuration to be used, whether an identifier or a file path."); println!(" -D (=VALUE)\tDefine an 8-bit variable on the global scope (default: 1)"); + println!(" -h, --help\t\tPrint this message."); println!(" -o, --out \tFile path where the output should be located after execution."); println!(" -s, --stats\t\tPrint the statistics on how segments have been filled."); println!(" --stdout\t\tPrint the output binary to the standard output."); + println!(" -v, --version\t\tPrint the version of this program."); println!(" -Werror\t\tWarnings should be treated as errors."); std::process::exit(0); } diff --git a/crates/readrom/src/main.rs b/crates/readrom/src/main.rs index 4308d2e..e930e0e 100644 --- a/crates/readrom/src/main.rs +++ b/crates/readrom/src/main.rs @@ -15,7 +15,9 @@ fn print_help() { println!("Display information about NES/Famicom ROM files.\n"); println!("usage: readrom [OPTIONS] \n"); println!("Options:"); - println!(" -H, --header\tJust print the ROM header and quit."); + println!(" -h, --help\t\tPrint this message."); + println!(" -H, --header\t\tJust print the ROM header and quit."); + println!(" -v, --version\t\tPrint the version of this program."); std::process::exit(0); } diff --git a/crates/xa65/src/main.rs b/crates/xa65/src/main.rs index 6ac51c6..4fe034b 100644 --- a/crates/xa65/src/main.rs +++ b/crates/xa65/src/main.rs @@ -24,9 +24,11 @@ fn print_help() { println!("Options:"); println!(" -b, --bin \tAlternative to the binary for 'nasm'."); println!(" -C, --config \tLinker configuration to be used, whether an identifier or a file path."); - println!(" -s, --strict\tError out if the output differ or 'nasm' has produced an error."); + println!(" -h, --help\t\tPrint this message."); + println!(" -s, --strict\t\tError out if the output differ or 'nasm' has produced an error."); println!(" -o, --out \tFile path where the output should be located after execution."); println!(" --target nes\t\tUsed for compatibility with 'ca65'."); + println!(" -v, --version\t\tPrint the version of this program."); std::process::exit(0); } -- cgit v1.2.3