TI-16: Should handle case where taskwarrior hook is used before timew

- Thanks to Aaron Curtis.
This commit is contained in:
Paul Beckingham 2016-06-28 18:15:42 -04:00
parent d9f683c27b
commit b62a977bd5
4 changed files with 9 additions and 5 deletions

View file

@ -25,3 +25,4 @@ suggestions:
Ben Boeckel Ben Boeckel
Wade Duvall Wade Duvall
Sebastian Uharek Sebastian Uharek
Aaron Curtis

View file

@ -1,9 +1,11 @@
1.0.0 - 1.0.0 -
- TI-16 Should handle case where taskwarrior hook is used before timew
(thanks to Aaron Curtis).
- timew 0.9.5~alpha install bug - timew 0.9.5~alpha install bug
(thanks to Gordon Ball). (thanks to Gordon Ball).
- Improved out-of-source build for themes, holidays - Improved out-of-source build for themes, holidays
(thanks to Kent R. Spillner). (thanks to Kent R. Spillner).
------ current release --------------------------- ------ current release ---------------------------

View file

@ -54,9 +54,9 @@ combined = ' '.join(['"%s"' % tag for tag in tags])
# Started task. # Started task.
if 'start' in new and not 'start' in old: if 'start' in new and not 'start' in old:
os.system('timew start ' + combined) os.system('timew start ' + combined + ' :yes')
# Stopped task. # Stopped task.
elif not 'start' in new and 'start' in old: elif not 'start' in new and 'start' in old:
os.system('timew stop ' + combined) os.system('timew stop ' + combined + ' :yes')

View file

@ -158,7 +158,8 @@ void initializeDataAndRules (
// If dbLocation does not exist, ask whether it should be created. // If dbLocation does not exist, ask whether it should be created.
bool shinyNewDatabase = false; bool shinyNewDatabase = false;
if (! dbLocation.exists () && if (! dbLocation.exists () &&
confirm ("Create new database in " + dbLocation._data + "?")) (findHint (cli, ":yes") ||
confirm ("Create new database in " + dbLocation._data + "?")))
{ {
dbLocation.create (0700); dbLocation.create (0700);
shinyNewDatabase = true; shinyNewDatabase = true;