- Converted from A3::find_command to Parser::getCommand.
This commit is contained in:
Paul Beckingham 2014-05-25 19:41:02 -04:00
parent ce7506f4fc
commit f87d7bd94a

View file

@ -407,9 +407,8 @@ int Context::run ()
int Context::dispatch (std::string &out) int Context::dispatch (std::string &out)
{ {
// Autocomplete args against keywords. // Autocomplete args against keywords.
std::string command; std::string command = parser.getCommand ();
// TODO Obsolete. if (command != "")
if (a3.find_command (command))
{ {
updateXtermTitle (); updateXtermTitle ();
@ -764,11 +763,9 @@ void Context::updateXtermTitle ()
{ {
if (config.getBoolean ("xterm.title") && isatty (fileno (stdout))) if (config.getBoolean ("xterm.title") && isatty (fileno (stdout)))
{ {
std::string command; std::string command = parser.getCommand ();
// TODO Obsolete.
a3.find_command (command);
std::string title; std::string title;
// TODO Obsolete. // TODO Obsolete.
join (title, " ", a3.list ()); join (title, " ", a3.list ());
std::cout << "]0;task " << command << " " << title << ""; std::cout << "]0;task " << command << " " << title << "";
@ -779,11 +776,9 @@ void Context::updateXtermTitle ()
// This function allows a clean output if the command is a helper subcommand. // This function allows a clean output if the command is a helper subcommand.
void Context::updateVerbosity () void Context::updateVerbosity ()
{ {
std::string command; std::string command = parser.getCommand ();
// TODO Obsolete. if (command != "" &&
a3.find_command (command); command[0] == '_')
if (command[0] == '_')
{ {
verbosity.clear (); verbosity.clear ();
verbosity.push_back ("nothing"); verbosity.push_back ("nothing");