aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorselsta <selsta@sent.at>2020-05-16 21:26:11 +0200
committerselsta <selsta@sent.at>2020-05-16 21:26:11 +0200
commit4a9c3aca0374afe292dfc6f70fd5aa4c4cc7a4d2 (patch)
treef909501f754f96702a5840a6dd4cfc1eedaf20a3 /src
parentMerge pull request #6527 (diff)
downloadmonero-4a9c3aca0374afe292dfc6f70fd5aa4c4cc7a4d2.tar.xz
Revert "simplewallet: noob-friendly help menu"
This reverts commit 67b4a19edf7b9d6a407a79eca5c57819863bfd71.
Diffstat (limited to 'src')
-rw-r--r--src/cryptonote_core/cryptonote_core.cpp5
-rw-r--r--src/cryptonote_protocol/cryptonote_protocol_handler.inl3
-rw-r--r--src/simplewallet/simplewallet.cpp53
-rw-r--r--src/simplewallet/simplewallet.h1
4 files changed, 14 insertions, 48 deletions
diff --git a/src/cryptonote_core/cryptonote_core.cpp b/src/cryptonote_core/cryptonote_core.cpp
index 0f8bde3e9..e22705287 100644
--- a/src/cryptonote_core/cryptonote_core.cpp
+++ b/src/cryptonote_core/cryptonote_core.cpp
@@ -1649,9 +1649,8 @@ namespace cryptonote
<< "You can set the level of process detailization through \"set_log <level|categories>\" command," << ENDL
<< "where <level> is between 0 (no details) and 4 (very verbose), or custom category based levels (eg, *:WARNING)." << ENDL
<< ENDL
- << "Use the \"help\" command to see a simplified list of available commands." << ENDL
- << "Use the \"help_advanced\" command to see an advanced list of available commands." << ENDL
- << "Use \"help_advanced <command>\" to see a command's documentation." << ENDL
+ << "Use the \"help\" command to see the list of available commands." << ENDL
+ << "Use \"help <command>\" to see a command's documentation." << ENDL
<< "**********************************************************************" << ENDL);
m_starter_message_showed = true;
}
diff --git a/src/cryptonote_protocol/cryptonote_protocol_handler.inl b/src/cryptonote_protocol/cryptonote_protocol_handler.inl
index 3cbfbbe85..5fc1b2f2e 100644
--- a/src/cryptonote_protocol/cryptonote_protocol_handler.inl
+++ b/src/cryptonote_protocol/cryptonote_protocol_handler.inl
@@ -2318,8 +2318,7 @@ skip:
MGINFO_YELLOW(ENDL << "**********************************************************************" << ENDL
<< "You are now synchronized with the network. You may now start monero-wallet-cli." << ENDL
<< ENDL
- << "Use the \"help\" command to see a simplified list of available commands." << ENDL
- << "Use the \"help_advanced\" command to see an advanced list of available commands." << ENDL
+ << "Use the \"help\" command to see the list of available commands." << ENDL
<< "**********************************************************************");
m_sync_timer.pause();
if (ELPP->vRegistry()->allowed(el::Level::Info, "sync-info"))
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp
index 9d6c9b910..69d80b9c0 100644
--- a/src/simplewallet/simplewallet.cpp
+++ b/src/simplewallet/simplewallet.cpp
@@ -121,7 +121,7 @@ typedef cryptonote::simple_wallet sw;
#define SCOPED_WALLET_UNLOCK() SCOPED_WALLET_UNLOCK_ON_BAD_PASSWORD(return true;)
-#define PRINT_USAGE(usage_help_advanced) fail_msg_writer() << boost::format(tr("usage: %s")) % usage_help_advanced;
+#define PRINT_USAGE(usage_help) fail_msg_writer() << boost::format(tr("usage: %s")) % usage_help;
#define LONG_PAYMENT_ID_SUPPORT_CHECK() \
do { \
@@ -270,8 +270,7 @@ namespace
const char* USAGE_START_MINING_FOR_RPC("start_mining_for_rpc");
const char* USAGE_STOP_MINING_FOR_RPC("stop_mining_for_rpc");
const char* USAGE_VERSION("version");
- const char* USAGE_HELP_ADVANCED("help_advanced [<command>]");
- const char* USAGE_HELP("help");
+ const char* USAGE_HELP("help [<command>]");
std::string input_line(const std::string& prompt, bool yesno = false)
{
@@ -2308,7 +2307,7 @@ bool simple_wallet::on_unknown_command(const std::vector<std::string> &args)
{
if (args[0] == "exit" || args[0] == "q") // backward compat
return false;
- fail_msg_writer() << boost::format(tr("Unknown command '%s', try 'help_advanced'")) % args.front();
+ fail_msg_writer() << boost::format(tr("Unknown command '%s', try 'help'")) % args.front();
return true;
}
@@ -3037,37 +3036,13 @@ bool simple_wallet::set_export_format(const std::vector<std::string> &args/* = s
bool simple_wallet::help(const std::vector<std::string> &args/* = std::vector<std::string>()*/)
{
- message_writer() << "";
- message_writer() << tr("Commands:");
- message_writer() << "";
- message_writer() << tr("\"welcome\" - Read welcome message.");
- message_writer() << tr("\"donate <amount>\" - Donate XMR to the development team.");
- message_writer() << tr("\"balance\" - Show balance.");
- message_writer() << tr("\"address new\" - Create new subaddress.");
- message_writer() << tr("\"address all\" - Show all addresses.");
- message_writer() << tr("\"transfer <address> <amount>\" - Send XMR to an address.");
- message_writer() << tr("\"show_transfers [in|out|pending|failed|pool]\" - Show transactions.");
- message_writer() << tr("\"sweep_all <address>\" - Send whole balance to another wallet.");
- message_writer() << tr("\"seed\" - Show secret 25 words that can be used to recover this wallet.");
- message_writer() << tr("\"refresh\" - Synchronize wallet with the Monero network.");
- message_writer() << tr("\"status\" - Check current status of wallet.");
- message_writer() << tr("\"version\" - Check software version.");
- message_writer() << tr("\"help_advanced\" - Show list with more available commands.");
- message_writer() << tr("\"save\" - Save wallet.");
- message_writer() << tr("\"exit\" - Exit wallet.");
- message_writer() << "";
- return true;
-}
-
-bool simple_wallet::help_advanced(const std::vector<std::string> &args/* = std::vector<std::string>()*/)
-{
if(args.empty())
{
success_msg_writer() << get_commands_str();
}
else if ((args.size() == 2) && (args.front() == "mms"))
{
- // Little hack to be able to do "help_advanced mms <subcommand>"
+ // Little hack to be able to do "help mms <subcommand>"
std::vector<std::string> mms_args(1, args.front() + " " + args.back());
success_msg_writer() << get_command_usage(mms_args);
}
@@ -3461,7 +3436,7 @@ simple_wallet::simple_wallet()
"<subcommand> is one of:\n"
" init, info, signer, list, next, sync, transfer, delete, send, receive, export, note, show, set, help\n"
" send_signer_config, start_auto_config, stop_auto_config, auto_config\n"
- "Get help about a subcommand with: help_advanced mms <subcommand>"));
+ "Get help about a subcommand with: help mms <subcommand>, or mms help <subcommand>"));
m_cmd_binder.set_handler("mms init",
boost::bind(&simple_wallet::on_command, this, &simple_wallet::mms, _1),
tr(USAGE_MMS_INIT),
@@ -3611,14 +3586,10 @@ simple_wallet::simple_wallet()
boost::bind(&simple_wallet::stop_mining_for_rpc, this, _1),
tr(USAGE_STOP_MINING_FOR_RPC),
tr("Stop mining to pay for RPC access"));
- m_cmd_binder.set_handler("help_advanced",
- boost::bind(&simple_wallet::on_command, this, &simple_wallet::help_advanced, _1),
- tr(USAGE_HELP_ADVANCED),
- tr("Show the help section or the documentation about a <command>."));
m_cmd_binder.set_handler("help",
boost::bind(&simple_wallet::on_command, this, &simple_wallet::help, _1),
tr(USAGE_HELP),
- tr("Show simplified list of available commands."));
+ tr("Show the help section or the documentation about a <command>."));
m_cmd_binder.set_unknown_command_handler(boost::bind(&simple_wallet::on_command, this, &simple_wallet::on_unknown_command, _1));
m_cmd_binder.set_empty_command_handler(boost::bind(&simple_wallet::on_empty_command, this));
m_cmd_binder.set_cancel_handler(boost::bind(&simple_wallet::on_cancelled_command, this));
@@ -4770,9 +4741,8 @@ boost::optional<epee::wipeable_string> simple_wallet::new_wallet(const boost::pr
"**********************************************************************\n" <<
tr("Your wallet has been generated!\n"
"To start synchronizing with the daemon, use the \"refresh\" command.\n"
- "Use the \"help\" command to see a simplified list of available commands.\n"
- "Use the \"help_advanced\" command to see an advanced list of available commands.\n"
- "Use \"help_advanced <command>\" to see a command's documentation.\n"
+ "Use the \"help\" command to see the list of available commands.\n"
+ "Use \"help <command>\" to see a command's documentation.\n"
"Always use the \"exit\" command when closing monero-wallet-cli to save \n"
"your current session's state. Otherwise, you might need to synchronize \n"
"your wallet again (your wallet keys are NOT at risk in any case).\n")
@@ -5031,9 +5001,8 @@ boost::optional<epee::wipeable_string> simple_wallet::open_wallet(const boost::p
}
success_msg_writer() <<
"**********************************************************************\n" <<
- tr("Use the \"help\" command to see a simplified list of available commands.\n") <<
- tr("Use the \"help_advanced\" command to see an advanced list of available commands.\n") <<
- tr("Use \"help_advanced <command>\" to see a command's documentation.\n") <<
+ tr("Use the \"help\" command to see the list of available commands.\n") <<
+ tr("Use \"help <command>\" to see a command's documentation.\n") <<
"**********************************************************************";
return password;
}
@@ -11120,7 +11089,7 @@ void simple_wallet::mms_help(const std::vector<std::string> &args)
{
if (args.size() > 1)
{
- fail_msg_writer() << tr("Usage: help_advanced mms [<subcommand>]");
+ fail_msg_writer() << tr("Usage: mms help [<subcommand>]");
return;
}
std::vector<std::string> help_args;
diff --git a/src/simplewallet/simplewallet.h b/src/simplewallet/simplewallet.h
index bf459736f..b1f77567e 100644
--- a/src/simplewallet/simplewallet.h
+++ b/src/simplewallet/simplewallet.h
@@ -154,7 +154,6 @@ namespace cryptonote
bool set_persistent_rpc_client_id(const std::vector<std::string> &args = std::vector<std::string>());
bool set_auto_mine_for_rpc_payment_threshold(const std::vector<std::string> &args = std::vector<std::string>());
bool set_credits_target(const std::vector<std::string> &args = std::vector<std::string>());
- bool help_advanced(const std::vector<std::string> &args = std::vector<std::string>());
bool help(const std::vector<std::string> &args = std::vector<std::string>());
bool start_mining(const std::vector<std::string> &args);
bool stop_mining(const std::vector<std::string> &args);