mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-20 04:13:07 +02:00
- Task now allows mixed case attributes names (pri:, PRI:, Pri: ...) and
commands (add, ADD, Ad ...) (thanks to Vincent Fleuranceau)
This commit is contained in:
parent
4abc722eff
commit
4380c7c712
4 changed files with 12 additions and 7 deletions
4
AUTHORS
4
AUTHORS
|
@ -3,6 +3,7 @@ Principal Author:
|
||||||
|
|
||||||
Contributing Authors:
|
Contributing Authors:
|
||||||
Damian Glenny
|
Damian Glenny
|
||||||
|
Andy Lester
|
||||||
|
|
||||||
With thanks to:
|
With thanks to:
|
||||||
Eugene Kramer
|
Eugene Kramer
|
||||||
|
@ -14,5 +15,4 @@ With thanks to:
|
||||||
galvanizd
|
galvanizd
|
||||||
H. İbrahim Güngör
|
H. İbrahim Güngör
|
||||||
Stas Antons
|
Stas Antons
|
||||||
Andy Lester
|
Vincent Fleuranceau
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,8 @@ represents a feature release, and the Z represents a patch.
|
||||||
character (thanks to Andy Lester)
|
character (thanks to Andy Lester)
|
||||||
+ Task now uses dashes (-----) to column underlines when color is disabled
|
+ Task now uses dashes (-----) to column underlines when color is disabled
|
||||||
(thanks to Vincent Fleuranceau)
|
(thanks to Vincent Fleuranceau)
|
||||||
|
+ Task now allows mixed case attribute names (pri:, PRI:, Pri: ...) and
|
||||||
|
commands (add, ADD, Add ...) (thanks to Vincent Fleuranceau)
|
||||||
|
|
||||||
------ old releases ------------------------------
|
------ old releases ------------------------------
|
||||||
|
|
||||||
|
|
|
@ -98,6 +98,8 @@
|
||||||
first character (thanks to Andy Lester).
|
first character (thanks to Andy Lester).
|
||||||
<li>Task now uses dashes (-----) to underline column headings when
|
<li>Task now uses dashes (-----) to underline column headings when
|
||||||
color is disabled (thanks to Vincent Fleuranceau).
|
color is disabled (thanks to Vincent Fleuranceau).
|
||||||
|
<li>Task now allows mixed case attribute names (pri:, PRI:, Pri: ...)
|
||||||
|
and commands (add, ADD, Add ...) (thanks to Vincent Fleuranceau).
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
|
|
@ -371,7 +371,7 @@ void parse (
|
||||||
std::string to;
|
std::string to;
|
||||||
|
|
||||||
// An id is the first argument found that contains all digits.
|
// An id is the first argument found that contains all digits.
|
||||||
if (command != "add" && // "add" doesn't require an ID
|
if (lowerCase (command) != "add" && // "add" doesn't require an ID
|
||||||
task.getId () == 0 &&
|
task.getId () == 0 &&
|
||||||
validId (arg))
|
validId (arg))
|
||||||
task.setId (::atoi (arg.c_str ()));
|
task.setId (::atoi (arg.c_str ()));
|
||||||
|
@ -389,7 +389,7 @@ void parse (
|
||||||
// value.
|
// value.
|
||||||
else if ((colon = arg.find (":")) != std::string::npos)
|
else if ((colon = arg.find (":")) != std::string::npos)
|
||||||
{
|
{
|
||||||
std::string name = arg.substr (0, colon);
|
std::string name = lowerCase (arg.substr (0, colon));
|
||||||
std::string value = arg.substr (colon + 1, std::string::npos);
|
std::string value = arg.substr (colon + 1, std::string::npos);
|
||||||
|
|
||||||
if (validAttribute (name, value, conf))
|
if (validAttribute (name, value, conf))
|
||||||
|
@ -413,8 +413,9 @@ void parse (
|
||||||
// Command.
|
// Command.
|
||||||
else if (command == "")
|
else if (command == "")
|
||||||
{
|
{
|
||||||
if (isCommand (arg) && validCommand (arg))
|
std::string l = lowerCase (arg);
|
||||||
command = arg;
|
if (isCommand (l) && validCommand (l))
|
||||||
|
command = l;
|
||||||
else
|
else
|
||||||
descCandidate += arg;
|
descCandidate += arg;
|
||||||
// throw std::string ("'") + arg + "' is not a valid command.";
|
// throw std::string ("'") + arg + "' is not a valid command.";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue