mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Code Cleanup
- Removed conditional compilation of the shell, controlled by FEATURE_SHELL.
This commit is contained in:
parent
e4b0c6e7c0
commit
77ba7946f5
5 changed files with 1 additions and 15 deletions
|
@ -168,9 +168,7 @@ void Cmd::load ()
|
|||
commands.push_back ("log");
|
||||
commands.push_back ("prepend");
|
||||
commands.push_back ("projects");
|
||||
#ifdef FEATURE_SHELL
|
||||
commands.push_back ("shell");
|
||||
#endif
|
||||
commands.push_back ("start");
|
||||
commands.push_back ("stats");
|
||||
commands.push_back ("stop");
|
||||
|
|
|
@ -282,9 +282,7 @@ int Context::dispatch (std::string &out)
|
|||
else if (cmd.command == "import") { rc = handleImport (out); }
|
||||
else if (cmd.command == "duplicate") { rc = handleDuplicate (out); }
|
||||
else if (cmd.command == "edit") { rc = handleEdit (out); }
|
||||
#ifdef FEATURE_SHELL
|
||||
else if (cmd.command == "shell") { handleShell ( ); }
|
||||
#endif
|
||||
else if (cmd.command == "undo") { handleUndo ( ); }
|
||||
else if (cmd.command == "merge") { tdb.gc ();
|
||||
handleMerge (out); }
|
||||
|
|
|
@ -1182,10 +1182,7 @@ int handleShow (std::string& outs)
|
|||
"active.indicator tag.indicator recurrence.indicator recurrence.limit "
|
||||
"list.all.projects list.all.tags undo.style verbose rule.precedence.color "
|
||||
"merge.autopush merge.default.uri pull.default.uri push.default.uri "
|
||||
"xterm.title "
|
||||
#ifdef FEATURE_SHELL
|
||||
"shell.prompt "
|
||||
#endif
|
||||
"xterm.title shell.prompt "
|
||||
"import.synonym.status import.synonym.tags import.synonym.entry "
|
||||
"import.synonym.start import.synonym.due import.synonym.recur "
|
||||
"import.synonym.end import.synonym.project import.synonym.priority "
|
||||
|
@ -2429,7 +2426,6 @@ int handleIds (std::string& outs)
|
|||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
#ifdef FEATURE_SHELL
|
||||
void handleShell ()
|
||||
{
|
||||
if (context.hooks.trigger ("pre-shell-command"))
|
||||
|
@ -2508,7 +2504,6 @@ void handleShell ()
|
|||
context.hooks.trigger ("post-shell-command");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
int handleColor (std::string& outs)
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
|
||||
#define FEATURE_TDB_OPT 1 // TDB Optimization reduces file I/O.
|
||||
#define FEATURE_NEW_ID 1 // Echoes back new id.
|
||||
#define FEATURE_SHELL 1 // Interactive shell.
|
||||
#define FEATURE_URL 1 // URL support for import.
|
||||
// (always enabled for merge/push/pull)
|
||||
//#define FEATURE_REGEX 1 // Enables regexes for attribute modifiers,
|
||||
|
@ -88,9 +87,7 @@ void handleUndo ();
|
|||
void handleMerge (std::string&);
|
||||
void handlePush (std::string&);
|
||||
void handlePull (std::string&);
|
||||
#ifdef FEATURE_SHELL
|
||||
void handleShell ();
|
||||
#endif
|
||||
int deltaAppend (Task&);
|
||||
int deltaPrepend (Task&);
|
||||
int deltaDescription (Task&);
|
||||
|
|
|
@ -121,11 +121,9 @@ int shortUsage (std::string& outs)
|
|||
table.addCell (row, 1, "task undo");
|
||||
table.addCell (row, 2, "Reverts the most recent action.");
|
||||
|
||||
#ifdef FEATURE_SHELL
|
||||
row = table.addRow ();
|
||||
table.addCell (row, 1, "task shell");
|
||||
table.addCell (row, 2, "Launches an interactive shell.");
|
||||
#endif
|
||||
|
||||
row = table.addRow ();
|
||||
table.addCell (row, 1, "task duplicate ID [tags] [attrs] [desc...]");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue