Changeset View
Changeset View
Standalone View
Standalone View
src/bitcoin-cli.cpp
Show First 20 Lines • Show All 112 Lines • ▼ Show 20 Lines | |||||
// | // | ||||
static int AppInitRPC(int argc, char *argv[]) { | static int AppInitRPC(int argc, char *argv[]) { | ||||
// | // | ||||
// Parameters | // Parameters | ||||
// | // | ||||
gArgs.ParseParameters(argc, argv); | gArgs.ParseParameters(argc, argv); | ||||
if (argc < 2 || HelpRequested(gArgs) || gArgs.IsArgSet("-version")) { | if (argc < 2 || HelpRequested(gArgs) || gArgs.IsArgSet("-version")) { | ||||
std::string strUsage = | std::string strUsage = | ||||
strprintf(_("%s RPC client version"), _(PACKAGE_NAME)) + " " + | PACKAGE_NAME " RPC client version " + FormatFullVersion() + "\n"; | ||||
FormatFullVersion() + "\n"; | |||||
if (!gArgs.IsArgSet("-version")) { | if (!gArgs.IsArgSet("-version")) { | ||||
strUsage += | strUsage += "\n" | ||||
"\n" + _("Usage:") + "\n" + | "Usage: bitcoin-cli [options] <command> [params] " | ||||
" bitcoin-cli [options] <command> [params] " + | "Send command to " PACKAGE_NAME "\n" | ||||
strprintf(_("Send command to %s"), _(PACKAGE_NAME)) + "\n" + | "or: bitcoin-cli [options] -named <command> " | ||||
" bitcoin-cli [options] -named <command> [name=value] ... " + | "[name=value]... Send command to " PACKAGE_NAME | ||||
strprintf(_("Send command to %s (with named arguments)"), | " (with named arguments)\n" | ||||
_(PACKAGE_NAME)) + | "or: bitcoin-cli [options] help " | ||||
"\n" + " bitcoin-cli [options] help " + | "List commands\n" | ||||
_("List commands") + "\n" + | "or: bitcoin-cli [options] help <command> Get " | ||||
" bitcoin-cli [options] help <command> " + | "help for a command\n"; | ||||
_("Get help for a command") + "\n"; | |||||
strUsage += "\n" + HelpMessageCli(); | strUsage += "\n" + HelpMessageCli(); | ||||
} | } | ||||
fprintf(stdout, "%s", strUsage.c_str()); | fprintf(stdout, "%s", strUsage.c_str()); | ||||
if (argc < 2) { | if (argc < 2) { | ||||
fprintf(stderr, "Error: too few parameters\n"); | fprintf(stderr, "Error: too few parameters\n"); | ||||
return EXIT_FAILURE; | return EXIT_FAILURE; | ||||
▲ Show 20 Lines • Show All 457 Lines • Show Last 20 Lines |