aboutsummaryrefslogtreecommitdiff
path: root/src/bitcoin-cli.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <[email protected]>2014-06-12 16:42:41 +0200
committerWladimir J. van der Laan <[email protected]>2014-06-12 16:42:55 +0200
commitfe1f41728755851dfc000bdb99fce91bc7f24b8d (patch)
treea7bc4c720a442bdcbc1c41fb84b13e2058cf0070 /src/bitcoin-cli.cpp
parentRemove -beta suffix (diff)
parentqt: Unify AboutDialog and HelpMessageDialog (diff)
downloaddiscoin-fe1f41728755851dfc000bdb99fce91bc7f24b8d.tar.xz
discoin-fe1f41728755851dfc000bdb99fce91bc7f24b8d.zip
Merge pull request #4281
5c97aae qt: Unify AboutDialog and HelpMessageDialog (Wladimir J. van der Laan) 45615af Add 'about' information to `-version` output (Wladimir J. van der Laan) 97789d3 util: Add function FormatParagraph to format paragraph to fixed-width (Wladimir J. van der Laan) 96b733e Add `-version` option to get just the version (Wladimir J. van der Laan)
Diffstat (limited to 'src/bitcoin-cli.cpp')
-rw-r--r--src/bitcoin-cli.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/bitcoin-cli.cpp b/src/bitcoin-cli.cpp
index 29efdfa82..0bb71329f 100644
--- a/src/bitcoin-cli.cpp
+++ b/src/bitcoin-cli.cpp
@@ -39,16 +39,18 @@ static bool AppInitRPC(int argc, char* argv[])
return false;
}
- if (argc<2 || mapArgs.count("-?") || mapArgs.count("--help"))
+ if (argc<2 || mapArgs.count("-?") || mapArgs.count("-help") || mapArgs.count("-version"))
{
- // First part of help message is specific to RPC client
- std::string strUsage = _("Bitcoin Core RPC client version") + " " + FormatFullVersion() + "\n\n" +
- _("Usage:") + "\n" +
- " bitcoin-cli [options] <command> [params] " + _("Send command to Bitcoin Core") + "\n" +
- " bitcoin-cli [options] help " + _("List commands") + "\n" +
- " bitcoin-cli [options] help <command> " + _("Get help for a command") + "\n";
+ std::string strUsage = _("Bitcoin Core RPC client version") + " " + FormatFullVersion() + "\n";
+ if (!mapArgs.count("-version"))
+ {
+ strUsage += "\n" + _("Usage:") + "\n" +
+ " bitcoin-cli [options] <command> [params] " + _("Send command to Bitcoin Core") + "\n" +
+ " bitcoin-cli [options] help " + _("List commands") + "\n" +
+ " bitcoin-cli [options] help <command> " + _("Get help for a command") + "\n";
- strUsage += "\n" + HelpMessageCli(true);
+ strUsage += "\n" + HelpMessageCli(true);
+ }
fprintf(stdout, "%s", strUsage.c_str());
return false;