mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-02-02 21:37:05 +01:00
*: alias -h for --help
This commit is contained in:
committed by
Luke Dashjr
parent
131d7f997c
commit
af6edac0bd
@@ -62,7 +62,7 @@ static bool AppInitRPC(int argc, char* argv[])
|
|||||||
// Parameters
|
// Parameters
|
||||||
//
|
//
|
||||||
ParseParameters(argc, argv);
|
ParseParameters(argc, argv);
|
||||||
if (argc<2 || mapArgs.count("-?") || mapArgs.count("-help") || mapArgs.count("-version")) {
|
if (argc<2 || mapArgs.count("-?") || mapArgs.count("-h") || mapArgs.count("-help") || mapArgs.count("-version")) {
|
||||||
std::string strUsage = _("Bitcoin Core RPC client version") + " " + FormatFullVersion() + "\n";
|
std::string strUsage = _("Bitcoin Core RPC client version") + " " + FormatFullVersion() + "\n";
|
||||||
if (!mapArgs.count("-version")) {
|
if (!mapArgs.count("-version")) {
|
||||||
strUsage += "\n" + _("Usage:") + "\n" +
|
strUsage += "\n" + _("Usage:") + "\n" +
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ static bool AppInitRawTx(int argc, char* argv[])
|
|||||||
|
|
||||||
fCreateBlank = GetBoolArg("-create", false);
|
fCreateBlank = GetBoolArg("-create", false);
|
||||||
|
|
||||||
if (argc<2 || mapArgs.count("-?") || mapArgs.count("-help"))
|
if (argc<2 || mapArgs.count("-?") || mapArgs.count("-h") || mapArgs.count("-help"))
|
||||||
{
|
{
|
||||||
// First part of help message is specific to this utility
|
// First part of help message is specific to this utility
|
||||||
std::string strUsage = _("Bitcoin Core bitcoin-tx utility version") + " " + FormatFullVersion() + "\n\n" +
|
std::string strUsage = _("Bitcoin Core bitcoin-tx utility version") + " " + FormatFullVersion() + "\n\n" +
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ bool AppInit(int argc, char* argv[])
|
|||||||
ParseParameters(argc, argv);
|
ParseParameters(argc, argv);
|
||||||
|
|
||||||
// Process help and version before taking care about datadir
|
// Process help and version before taking care about datadir
|
||||||
if (mapArgs.count("-?") || mapArgs.count("-help") || mapArgs.count("-version"))
|
if (mapArgs.count("-?") || mapArgs.count("-h") || mapArgs.count("-help") || mapArgs.count("-version"))
|
||||||
{
|
{
|
||||||
std::string strUsage = _("Bitcoin Core Daemon") + " " + _("version") + " " + FormatFullVersion() + "\n";
|
std::string strUsage = _("Bitcoin Core Daemon") + " " + _("version") + " " + FormatFullVersion() + "\n";
|
||||||
|
|
||||||
|
|||||||
@@ -548,7 +548,7 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
// Show help message immediately after parsing command-line options (for "-lang") and setting locale,
|
// Show help message immediately after parsing command-line options (for "-lang") and setting locale,
|
||||||
// but before showing splash screen.
|
// but before showing splash screen.
|
||||||
if (mapArgs.count("-?") || mapArgs.count("-help") || mapArgs.count("-version"))
|
if (mapArgs.count("-?") || mapArgs.count("-h") || mapArgs.count("-help") || mapArgs.count("-version"))
|
||||||
{
|
{
|
||||||
HelpMessageDialog help(NULL, mapArgs.count("-version"));
|
HelpMessageDialog help(NULL, mapArgs.count("-version"));
|
||||||
help.showOrPrint();
|
help.showOrPrint();
|
||||||
|
|||||||
Reference in New Issue
Block a user