diff --git a/cli/src/main/java/bisq/cli/app/BisqCliMain.java b/cli/src/main/java/bisq/cli/app/BisqCliMain.java index 9d09c26a14b..015051bdc32 100644 --- a/cli/src/main/java/bisq/cli/app/BisqCliMain.java +++ b/cli/src/main/java/bisq/cli/app/BisqCliMain.java @@ -31,6 +31,7 @@ import static bisq.cli.app.CommandParser.GETBALANCE; import static bisq.cli.app.CommandParser.GETVERSION; +import static bisq.cli.app.CommandParser.HELP; import static bisq.cli.app.CommandParser.STOPSERVER; import static java.lang.String.format; import static java.lang.System.exit; @@ -77,6 +78,9 @@ private BisqCliMain(ManagedChannel channel) { private String runCommand(String command) { final String result; switch (command) { + case HELP: + CommandParser.printHelp(); + exit(EXIT_SUCCESS); case GETBALANCE: long satoshis = cmd.getBalance(); result = satoshis == -1 ? "Server initializing..." : cmd.prettyBalance.apply(satoshis); @@ -99,7 +103,7 @@ private String parseCommand(String[] params) { OptionSet options = parser.parse(params); List detectedOptions = nonOptions.values(options); if (detectedOptions.isEmpty()) { - CommandParser.printUsage(); + CommandParser.printHelp(); exit(EXIT_FAILURE); } return detectedOptions.get(0); diff --git a/cli/src/main/java/bisq/cli/app/CommandParser.java b/cli/src/main/java/bisq/cli/app/CommandParser.java index 0974fbd33c0..b1615d81165 100644 --- a/cli/src/main/java/bisq/cli/app/CommandParser.java +++ b/cli/src/main/java/bisq/cli/app/CommandParser.java @@ -20,7 +20,7 @@ OptionParser configure() { return parser; } - static void printUsage() { + static void printHelp() { out.println("Usage: bisq-cli getbalance | getversion"); }