-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add emojis and improve help output for ghostkey command
- Loading branch information
Showing
1 changed file
with
10 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,10 +37,11 @@ fn main() { | |
} | ||
|
||
fn run() -> i32 { | ||
let matches = Command::new("Freenet Ghost Key Utility") | ||
let matches = Command::new("👻🔑 Freenet Ghost Key Utility") | ||
.version(env!("CARGO_PKG_VERSION")) | ||
.author("Ian Clarke <[email protected]>") | ||
.about("Utility for generating and verifying Freenet ghost keys") | ||
.after_help("Run 'ghostkey <COMMAND> -h' for more information on a specific command.") | ||
.subcommand( | ||
Command::new(CMD_VERIFY_GHOST_KEY) | ||
.about("Verifies a ghost certificate") | ||
|
@@ -59,6 +60,8 @@ fn run() -> i32 { | |
.value_name("FILE"), | ||
), | ||
) | ||
.subcommand_required(true) | ||
.arg_required_else_help(true) | ||
.subcommand( | ||
Command::new(CMD_GENERATE_MASTER_KEY) | ||
.about("Generate a new master keypair") | ||
|
@@ -386,7 +389,12 @@ fn run() -> i32 { | |
verify_signed_message_cmd(signed_message_file, &master_verifying_key, output_file) | ||
} | ||
_ => { | ||
info!("No valid subcommand provided. Use --help for usage information."); | ||
println!("👻🔑 Welcome to the Freenet Ghost Key Utility!"); | ||
println!("Use 'ghostkey -h' for detailed usage information."); | ||
println!("Available commands:"); | ||
for (name, cmd) in matches.get_subcommands() { | ||
println!(" {} - {}", name, cmd.get_about().unwrap_or("")); | ||
} | ||
0 | ||
} | ||
} | ||
|