Apply consistent style to argument help text

This commit is contained in:
Chris Beams 2014-11-06 09:40:01 +01:00
parent da163bcc97
commit 1f136de1a1
No known key found for this signature in database
GPG key ID: 3D214F8F5BC5ED73

View file

@ -24,14 +24,6 @@ import net.sourceforge.argparse4j.ArgumentParsers;
import net.sourceforge.argparse4j.inf.ArgumentParserException;
import net.sourceforge.argparse4j.inf.Namespace;
/*
optional arguments:
-h, --help show this help message and exit
-d PEER_ID, --peerid PEER Seed peer ID (default: "digitalocean1.bitsquare.io")
-p PORT, --port PORT IP port to listen on. (default: 5000)
-i INTERFACE, --interface INTERFACE Network interface to listen on.
-n NAME, --name NAME Append name to application name.
*/
public class ArgumentParser {
public static final String PEER_ID_FLAG = "peerid";
@ -45,17 +37,17 @@ public class ArgumentParser {
public ArgumentParser() {
parser = ArgumentParsers.newArgumentParser("Bitsquare")
.defaultHelp(true)
.description("Bitsquare - The decentralized bitcoin exchange.");
.description("Bitsquare - The decentralized bitcoin exchange");
parser.addArgument("-d", "--" + PEER_ID_FLAG)
.setDefault(PEER_ID_DEFAULT)
.help("Seed peer ID.");
.help("Seed peer ID");
parser.addArgument("-p", "--" + PORT_FLAG)
.setDefault(Node.DEFAULT_PORT)
.help("IP port to listen on.");
.help("Port to listen on");
parser.addArgument("-i", "--" + INTERFACE_HINT_FLAG)
.help("Network interface to listen on.");
.help("Network interface to listen on");
parser.addArgument("-n", "--" + NAME_FLAG)
.help("Append name to application name.");
.help("Name to append name to default application name");
}
public Namespace parseArgs(String... args) {