mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +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:
|
||||
Damian Glenny
|
||||
Andy Lester
|
||||
|
||||
With thanks to:
|
||||
Eugene Kramer
|
||||
|
@ -14,5 +15,4 @@ With thanks to:
|
|||
galvanizd
|
||||
H. İbrahim Güngör
|
||||
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)
|
||||
+ Task now uses dashes (-----) to column underlines when color is disabled
|
||||
(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 ------------------------------
|
||||
|
||||
|
|
|
@ -98,6 +98,8 @@
|
|||
first character (thanks to Andy Lester).
|
||||
<li>Task now uses dashes (-----) to underline column headings when
|
||||
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>
|
||||
|
||||
<p>
|
||||
|
|
|
@ -371,8 +371,8 @@ void parse (
|
|||
std::string to;
|
||||
|
||||
// An id is the first argument found that contains all digits.
|
||||
if (command != "add" && // "add" doesn't require an ID
|
||||
task.getId () == 0 &&
|
||||
if (lowerCase (command) != "add" && // "add" doesn't require an ID
|
||||
task.getId () == 0 &&
|
||||
validId (arg))
|
||||
task.setId (::atoi (arg.c_str ()));
|
||||
|
||||
|
@ -389,7 +389,7 @@ void parse (
|
|||
// value.
|
||||
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);
|
||||
|
||||
if (validAttribute (name, value, conf))
|
||||
|
@ -413,8 +413,9 @@ void parse (
|
|||
// Command.
|
||||
else if (command == "")
|
||||
{
|
||||
if (isCommand (arg) && validCommand (arg))
|
||||
command = arg;
|
||||
std::string l = lowerCase (arg);
|
||||
if (isCommand (l) && validCommand (l))
|
||||
command = l;
|
||||
else
|
||||
descCandidate += arg;
|
||||
// throw std::string ("'") + arg + "' is not a valid command.";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue