mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Enhancement - Command Line Parsing
- Fixed problem where a blank ID was considered valid. For example, the command "task 1 -2" should use -2 as the description, but instead considered this to be the sequence 1,0,2. - Replaced old validId calls with the new validSequence calls. - A sequence has been redefined to be the first set of consecutive arguments that look like sequences. Once broken by a non-sequence argument, all remaining args, even if they look like a sequence, are not considered part of the sequence. This allows commands like "task append 1,3-5 Write 10 emails", where 10 is not part of the sequence because of the intervening "Write". - Unit tests (parse.t.cpp) that exercise the parsing of sequences. Should probably be expanded to cover more.
This commit is contained in:
parent
2975b9244a
commit
98391a0c24
4 changed files with 167 additions and 18 deletions
|
@ -1,4 +1,5 @@
|
|||
PROJECT = t.t tdb.t date.t duration.t t.benchmark.t text.t autocomplete.t
|
||||
PROJECT = t.t tdb.t date.t duration.t t.benchmark.t text.t autocomplete.t \
|
||||
parse.t
|
||||
CFLAGS = -I. -I.. -Wall -pedantic -ggdb3 -fno-rtti
|
||||
LFLAGS = -L/usr/local/lib
|
||||
OBJECTS = ../TDB.o ../T.o ../parse.o ../text.o ../Date.o ../util.o ../Config.o
|
||||
|
@ -38,3 +39,6 @@ text.t: text.t.o $(OBJECTS) test.o
|
|||
autocomplete.t: autocomplete.t.o $(OBJECTS) test.o
|
||||
g++ autocomplete.t.o $(OBJECTS) test.o $(LFLAGS) -o autocomplete.t
|
||||
|
||||
parse.t: parse.t.o $(OBJECTS) test.o
|
||||
g++ parse.t.o $(OBJECTS) test.o $(LFLAGS) -o parse.t
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue