Skip to content

Commit

Permalink
feat: Add emojis and improve help output for ghostkey command
Browse files Browse the repository at this point in the history
  • Loading branch information
sanity committed Aug 11, 2024
1 parent 1a2684c commit 9634e97
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions rust/cli/src/bin/ghostkey.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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")
Expand Down Expand Up @@ -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
}
}
Expand Down

0 comments on commit 9634e97

Please sign in to comment.