<p></p>
<p><b>@ghubstan</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/bisq-network/bisq/pull/4097#discussion_r400246596">cli/src/main/java/bisq/cli/app/CommandParser.java</a>:</p>
<pre style='color:#555'>> +    // Option name constants
+    static final String HELP = "help";
+    static final String GETBALANCE = "getbalance";
+    static final String GETVERSION = "getversion";
+    static final String STOPSERVER = "stopserver";
+
+    OptionParser configure() {
+        OptionParser parser = new OptionParser();
+        parser.allowsUnrecognizedOptions();
+        parser.nonOptions(GETBALANCE).ofType(String.class).describedAs("get btc balance");
+        parser.nonOptions(GETVERSION).ofType(String.class).describedAs("get bisq version");
+        return parser;
+    }
+
+    static void printUsage() {
+        err.println("Usage:  bisq-cli getbalance | getversion");
</pre>
<p>Prints usage message to stdout, and uses EXIT_SUCCESS and EXIT_FAILURE arguments in System.exit().</p>
<p>What's not done:  help formatting.  I need to discuss Bisq + <code>joptsimple.HelpFormatter</code> issues with <a class="user-mention" data-hovercard-type="user" data-hovercard-url="/users/cbeams/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/cbeams">@cbeams</a>.  Right now, the only options passed to Cli are of type <code>NonOptionArgumentSpec</code>, which did not work as expected with <code>joptsimple.HelpFormatter</code>.  It looks like Bisq Config only uses <code>ArgumentAcceptingOptionSpec</code> options, which do work with <code>joptsimple.HelpFormatter</code>.  It did not seem correct to change non-option cli arguments to argument accepting options just to make them work with the <code>joptsimple.HelpFormatter</code> interface, which is why I checked in the</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/bisq-network/bisq/pull/4097#discussion_r400246596">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNSSZ4Y6MK3762IL6GTRKCVUHANCNFSM4LVDCNHQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AJFFTNWVMARVLB3VJGVUUJTRKCVUHA5CNFSM4LVDCNH2YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOC3RDYMI.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/bisq-network/bisq/pull/4097#discussion_r400246596",
"url": "https://github.com/bisq-network/bisq/pull/4097#discussion_r400246596",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>