mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Added _sha1 helper command to quickly identify a
task dev version.
This commit is contained in:
parent
ae4e28689d
commit
c0c58f9aff
4 changed files with 18 additions and 0 deletions
|
@ -134,6 +134,7 @@ void Cmd::load ()
|
|||
commands.push_back ("_ids");
|
||||
commands.push_back ("_config");
|
||||
commands.push_back ("_version");
|
||||
commands.push_back ("_sha1");
|
||||
commands.push_back ("_urgency");
|
||||
commands.push_back ("_query");
|
||||
commands.push_back ("_zshcommands");
|
||||
|
@ -243,6 +244,7 @@ bool Cmd::isReadOnlyCommand ()
|
|||
command == "_ids" ||
|
||||
command == "_config" ||
|
||||
command == "_version" ||
|
||||
command == "_sha1" ||
|
||||
command == "_urgency" ||
|
||||
command == "_query" ||
|
||||
command == "_zshcommands" ||
|
||||
|
|
|
@ -269,6 +269,7 @@ int Context::dispatch (std::string &out)
|
|||
else if (cmd.command == "_ids") { rc = handleCompletionIDs (out); }
|
||||
else if (cmd.command == "_config") { rc = handleCompletionConfig (out); }
|
||||
else if (cmd.command == "_version") { rc = handleCompletionVersion (out); }
|
||||
else if (cmd.command == "_sha1") { rc = handleSha1 (out); }
|
||||
else if (cmd.command == "_urgency") { rc = handleUrgency (out); }
|
||||
else if (cmd.command == "_query") { rc = handleQuery (out); }
|
||||
else if (cmd.command == "_zshcommands") { rc = handleZshCompletionCommands (out); }
|
||||
|
|
|
@ -529,6 +529,20 @@ int handleCompletionVersion (std::string& outs)
|
|||
return 0;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// A simple SHA1 display for use during development to identify which task
|
||||
// version one is running.
|
||||
int handleSha1 (std::string& outs)
|
||||
{
|
||||
#ifdef HAVE_COMMIT
|
||||
outs = COMMIT;
|
||||
#else
|
||||
outs = "No SHA1 available";
|
||||
#endif
|
||||
outs += "\n";
|
||||
return 0;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Temporary command to display urgency for a task.
|
||||
int handleUrgency (std::string& outs)
|
||||
|
|
|
@ -67,6 +67,7 @@ int handleCompletionCommands (std::string&);
|
|||
int handleCompletionIDs (std::string&);
|
||||
int handleCompletionConfig (std::string&);
|
||||
int handleCompletionVersion (std::string&);
|
||||
int handleSha1 (std::string&);
|
||||
int handleUrgency (std::string&);
|
||||
int handleQuery (std::string&);
|
||||
int handleZshCompletionCommands (std::string&);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue