mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-28 13:37:20 +02:00
Context
- Converted from Parser::getCommand to CLI::getCommand.
This commit is contained in:
parent
6056ca4cd7
commit
8863458879
1 changed files with 8 additions and 8 deletions
|
@ -451,7 +451,7 @@ 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 = parser.getCommand ();
|
std::string command = cli.getCommand ();
|
||||||
if (command != "")
|
if (command != "")
|
||||||
{
|
{
|
||||||
updateXtermTitle ();
|
updateXtermTitle ();
|
||||||
|
@ -798,16 +798,16 @@ void Context::updateXtermTitle ()
|
||||||
{
|
{
|
||||||
if (config.getBoolean ("xterm.title") && isatty (fileno (stdout)))
|
if (config.getBoolean ("xterm.title") && isatty (fileno (stdout)))
|
||||||
{
|
{
|
||||||
std::string command = parser.getCommand ();
|
std::string command = cli.getCommand ();
|
||||||
std::string title;
|
std::string title;
|
||||||
Tree* tree = parser.tree ();
|
|
||||||
std::vector <Tree*>::iterator i;
|
std::vector <A>::const_iterator a;
|
||||||
for (i = tree->_branches.begin (); i != tree->_branches.end (); ++i)
|
for (a = cli._args.begin (); a != cli._args.end (); ++a)
|
||||||
{
|
{
|
||||||
if (i != tree->_branches.begin ())
|
if (a != cli._args.begin ())
|
||||||
title += ' ';
|
title += ' ';
|
||||||
|
|
||||||
title += (*i)->attribute ("raw");
|
title += a->attribute ("raw");
|
||||||
}
|
}
|
||||||
|
|
||||||
std::cout << "]0;task " << command << " " << title << "";
|
std::cout << "]0;task " << command << " " << title << "";
|
||||||
|
@ -818,7 +818,7 @@ 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 = parser.getCommand ();
|
std::string command = cli.getCommand ();
|
||||||
if (command != "" &&
|
if (command != "" &&
|
||||||
command[0] == '_')
|
command[0] == '_')
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue