Bug #348
task done a little over zealous
| Status: | New | Start: | 12/07/2009 | |
| Priority: | Normal | Due date: | ||
| To: | - | % Done: | 0% |
|
| Category: | core | Spent time: | - | |
| Target version: | 2.0.x - Katana | |||
Description
$ task add do the landry Created task 214 $ task 214 do the laundry Task 214 "do the landry" - end was set to '12/7/2009' - description was changed from 'do the landry' to 'the laundry' - status was changed from 'pending' to 'completed' Are you sure? (yes/no/all)
Bad example I realize, but "do" gets interpretted as done here where one is simpy trying to change the subject. Abbreviations are good, but this case yields the wrong result. I see two realy decent solutions:
1. introduce a new command that is required to change the subject (good: hard for user to get it wrong / bad: change in interface)
2. ignore the abbreviation when other, unexplained args are present (good: same ol' interface / bad: ?)
History
Updated by David Patrick 233 days ago
Maybe just clarifying the syntax ?
is
$ task 127 do
correct ?
shouldn't it be
$ task do 127
?
Especially with "done" we should be picky with the structure.
And isn't it a little bizarre that it accepted "do" as both short-for-done AND the first part of "do the laundry" ?
I mean, bravo if you think you can use double-duty like that, but it seems beyond ambiguous.
Updated by Paul Beckingham 233 days ago
Yes, both
task 123 do task do 123
are correct. Task takes the first numeric argument it finds as an ID, and the first recognized command. Note that in the first place, task took "add" as the command, not "do". One day we'll be using a proper BNF parser to scan that command line, and there will be an enforced formal grammar. But not yet.
Note also that task now makes you confirm every time you clobber the description. This is relatively new.
Here are three ways to do it without tickling that bug:
task 214 /landry/laundry/ task 214 "do the laundry" task 214 edit <-- cheating
From the tense of the language ("end was set to ...") I can see you are not running task 1.8.5. The cobbler's kids have no shoes.
Updated by John Florian 233 days ago
task ID COMMANDrather than
task COMMAND ID
as it just reads better to me (but I am left handed FWIW). Usually in a misspelling case like this I would use the subst pattern as it is the most natural to me ... hence my calling it a bad example -- just the first thing that popped into my head to distill the problem down its essence.
You're right about 1.8.5 and the cobbler's shoes. Preparing for upgrades to F12 around the house and the mirror job ran the logical volume out of space, so I'm not getting updates either.
I think we should just change task so that if you command it to "do" a task, it simply responds, with, "No! You do it." :-)
Updated by Federico Hernandez 170 days ago
- Category set to core
- Target version set to 2.0.x - Katana
Didn't had a category nor a target version