mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 02:25:40 +01:00
Send --help message to stdout i.s.o stderr
This allows fun stuff such as `bitcoin --help | less`, and more easy piping to files. Looking at other tools such as bash, gcc, they all send their help text to stdout.
This commit is contained in:
parent
0547b02af7
commit
bb353618f1
@ -144,7 +144,7 @@ bool AppInit(int argc, char* argv[])
|
||||
|
||||
strUsage += "\n" + HelpMessage();
|
||||
|
||||
fprintf(stderr, "%s", strUsage.c_str());
|
||||
fprintf(stdout, "%s", strUsage.c_str());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -439,7 +439,7 @@ void HelpMessageBox::printToConsole()
|
||||
{
|
||||
// On other operating systems, the expected action is to print the message to the console.
|
||||
QString strUsage = header + "\n" + coreOptions + "\n" + uiOptions;
|
||||
fprintf(stderr, "%s", strUsage.toStdString().c_str());
|
||||
fprintf(stdout, "%s", strUsage.toStdString().c_str());
|
||||
}
|
||||
|
||||
void HelpMessageBox::showOrPrint()
|
||||
|
Loading…
Reference in New Issue
Block a user