From 2e26e6f313e59a3c10162cc2eb26636a5e8e783f Mon Sep 17 00:00:00 2001 From: Chiru <48340051+ch1ru@users.noreply.github.com> Date: Mon, 31 Oct 2022 15:21:13 +0000 Subject: [PATCH] Semantically sort subheadings --- src/cli.rs | 41 +++++++++++++++++++++++++++-------------- 1 file changed, 27 insertions(+), 14 deletions(-) diff --git a/src/cli.rs b/src/cli.rs index 8dbba3d..d53b74b 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -474,20 +474,33 @@ pub(crate) async fn poll_for_user_input( } fn help() { - println!("openchannel pubkey@host:port [--public]"); - println!("sendpayment "); - println!("keysend "); - println!("getinvoice "); - println!("connectpeer pubkey@host:port"); - println!("listchannels"); - println!("listpayments"); - println!("closechannel "); - println!("forceclosechannel "); - println!("nodeinfo"); - println!("listpeers"); - println!("signmessage "); - println!("sendonionmessage "); - println!("quit") + let package_version = env!("CARGO_PKG_VERSION"); + let package_name = env!("CARGO_PKG_NAME"); + println!("\nVERSION:"); + println!(" {} v{}", package_name, package_version); + println!("\nUSAGE:"); + println!(" Command [arguments]"); + println!("\nCOMMANDS:"); + println!(" help\tShows a list of commands."); + println!(" quit\tClose the application."); + println!("\n Channels:"); + println!(" openchannel pubkey@host:port [--public]"); + println!(" closechannel "); + println!(" forceclosechannel "); + println!(" listchannels"); + println!("\n Peers:"); + println!(" connectpeer pubkey@host:port"); + println!(" listpeers"); + println!("\n Payments:"); + println!(" sendpayment "); + println!(" keysend "); + println!(" listpayments"); + println!("\n Invoices:"); + println!(" getinvoice "); + println!("\n Other:"); + println!(" signmessage "); + println!(" sendonionmessage "); + println!(" nodeinfo"); } fn node_info(channel_manager: &Arc, peer_manager: &Arc) { -- 2.39.5