diff --git a/tests/t1000-addlist.sh b/tests/t1000-addlist.sh index 42e16e8..e27557e 100755 --- a/tests/t1000-addlist.sh +++ b/tests/t1000-addlist.sh @@ -12,7 +12,7 @@ command work, including support for filtering. # test_todo_session 'basic add/list' <>> todo.sh add notice the daisies -1: notice the daisies +1 notice the daisies TODO: 1 added. >>> todo.sh list @@ -21,7 +21,7 @@ TODO: 1 added. TODO: 1 of 1 tasks shown >>> todo.sh add smell the roses -2: smell the roses +2 smell the roses TODO: 2 added. >>> todo.sh list @@ -48,7 +48,7 @@ EOF test_todo_session 'case-insensitive filtering' <>> todo.sh add smell the uppercase Roses -3: smell the uppercase Roses +3 smell the uppercase Roses TODO: 3 added. >>> todo.sh list roses @@ -60,7 +60,7 @@ EOF test_todo_session 'add with &' <>> todo.sh add "dig the garden & water the flowers" -4: dig the garden & water the flowers +4 dig the garden & water the flowers TODO: 4 added. >>> todo.sh list diff --git a/tests/t1010-add-date.sh b/tests/t1010-add-date.sh index 603d199..bb9632c 100755 --- a/tests/t1010-add-date.sh +++ b/tests/t1010-add-date.sh @@ -12,7 +12,7 @@ a date to each item. # test_todo_session 'cmd line first day' <>> todo.sh -t add notice the daisies -1: 2009-02-13 notice the daisies +1 2009-02-13 notice the daisies TODO: 1 added. >>> todo.sh list @@ -25,7 +25,7 @@ test_tick test_todo_session 'cmd line second day' <>> todo.sh -t add smell the roses -2: 2009-02-14 smell the roses +2 2009-02-14 smell the roses TODO: 2 added. >>> todo.sh list @@ -39,7 +39,7 @@ test_tick test_todo_session 'cmd line third day' <>> todo.sh -t add mow the lawn -3: 2009-02-15 mow the lawn +3 2009-02-15 mow the lawn TODO: 3 added. >>> todo.sh list @@ -58,7 +58,7 @@ test_tick 3600 test_todo_session 'config file third day' <>> todo.sh add take out the trash -4: 2009-02-15 take out the trash +4 2009-02-15 take out the trash TODO: 4 added. >>> todo.sh list diff --git a/tests/t1020-addtolistfile.sh b/tests/t1020-addtolistfile.sh index c2c672a..42cad3c 100755 --- a/tests/t1020-addtolistfile.sh +++ b/tests/t1020-addtolistfile.sh @@ -20,7 +20,7 @@ touch "$HOME/garden.txt" test_todo_session 'basic addto/listfile' <>> todo.sh addto garden.txt notice the daisies -1: notice the daisies +1 notice the daisies GARDEN: 1 added. >>> todo.sh listfile garden.txt @@ -29,7 +29,7 @@ GARDEN: 1 added. GARDEN: 1 of 1 tasks shown >>> todo.sh addto garden.txt smell the roses -2: smell the roses +2 smell the roses GARDEN: 2 added. >>> todo.sh listfile garden.txt @@ -56,7 +56,7 @@ EOF test_todo_session 'case-insensitive filtering' <>> todo.sh addto garden.txt smell the uppercase Roses -3: smell the uppercase Roses +3 smell the uppercase Roses GARDEN: 3 added. >>> todo.sh listfile garden.txt roses @@ -68,7 +68,7 @@ EOF test_todo_session 'addto with &' <>> todo.sh addto garden.txt "dig the garden & water the flowers" -4: dig the garden & water the flowers +4 dig the garden & water the flowers GARDEN: 4 added. >>> todo.sh listfile garden.txt diff --git a/tests/t1030-addto-date.sh b/tests/t1030-addto-date.sh index 899794d..5365102 100755 --- a/tests/t1030-addto-date.sh +++ b/tests/t1030-addto-date.sh @@ -14,7 +14,7 @@ touch "$HOME/garden.txt" # test_todo_session 'cmd line first day' <>> todo.sh -t addto garden.txt notice the daisies -1: 2009-02-13 notice the daisies +1 2009-02-13 notice the daisies GARDEN: 1 added. >>> todo.sh listfile garden.txt @@ -27,7 +27,7 @@ test_tick test_todo_session 'cmd line second day' <>> todo.sh -t addto garden.txt smell the roses -2: 2009-02-14 smell the roses +2 2009-02-14 smell the roses GARDEN: 2 added. >>> todo.sh listfile garden.txt @@ -41,7 +41,7 @@ test_tick test_todo_session 'cmd line third day' <>> todo.sh -t addto garden.txt mow the lawn -3: 2009-02-15 mow the lawn +3 2009-02-15 mow the lawn GARDEN: 3 added. >>> todo.sh listfile garden.txt @@ -60,7 +60,7 @@ test_tick 3600 test_todo_session 'config file third day' <>> todo.sh addto garden.txt take out the trash -4: 2009-02-15 take out the trash +4 2009-02-15 take out the trash GARDEN: 4 added. >>> todo.sh listfile garden.txt diff --git a/tests/t1100-replace.sh b/tests/t1100-replace.sh index bd1570f..4aee428 100755 --- a/tests/t1100-replace.sh +++ b/tests/t1100-replace.sh @@ -19,9 +19,9 @@ EOF test_todo_session 'basic replace' <>> todo.sh replace 1 "smell the cows" -1: notice the daisies +1 notice the daisies TODO: Replaced task with: -1: smell the cows +1 smell the cows >>> todo.sh list 1 smell the cows @@ -29,9 +29,9 @@ TODO: Replaced task with: TODO: 1 of 1 tasks shown >>> todo.sh replace 1 smell the roses -1: smell the cows +1 smell the cows TODO: Replaced task with: -1: smell the roses +1 smell the roses >>> todo.sh list 1 smell the roses @@ -47,42 +47,42 @@ chase the chickens EOF test_todo_session 'replace in multi-item file' <>> todo.sh replace 1 smell the cheese -1: smell the cows +1 smell the cows TODO: Replaced task with: -1: smell the cheese +1 smell the cheese >>> todo.sh replace 3 jump on hay -3: thrash some hay +3 thrash some hay TODO: Replaced task with: -3: jump on hay +3 jump on hay >>> todo.sh replace 4 collect the eggs -4: chase the chickens +4 chase the chickens TODO: Replaced task with: -4: collect the eggs +4 collect the eggs EOF test_todo_session 'replace with priority' <>> todo.sh pri 4 a -4: (A) collect the eggs +4 (A) collect the eggs TODO: 4 prioritized (A). >>> todo.sh replace 4 "collect the bread" -4: (A) collect the eggs +4 (A) collect the eggs TODO: Replaced task with: -4: (A) collect the bread +4 (A) collect the bread >>> todo.sh replace 4 collect the eggs -4: (A) collect the bread +4 (A) collect the bread TODO: Replaced task with: -4: (A) collect the eggs +4 (A) collect the eggs EOF test_todo_session 'replace with &' << EOF >>> todo.sh replace 3 "thrash the hay & thresh the wheat" -3: jump on hay +3 jump on hay TODO: Replaced task with: -3: thrash the hay & thresh the wheat +3 thrash the hay & thresh the wheat EOF test_todo_session 'replace error' << EOF @@ -94,41 +94,41 @@ EOF cat /dev/null > todo.txt test_todo_session 'replace handling prepended date on add' <>> todo.sh -t add "new task" -1: 2009-02-13 new task +1 2009-02-13 new task TODO: 1 added. >>> todo.sh replace 1 this is just a new one -1: 2009-02-13 new task +1 2009-02-13 new task TODO: Replaced task with: -1: 2009-02-13 this is just a new one +1 2009-02-13 this is just a new one >>> todo.sh replace 1 2010-07-04 this also has a new date -1: 2009-02-13 this is just a new one +1 2009-02-13 this is just a new one TODO: Replaced task with: -1: 2010-07-04 this also has a new date +1 2010-07-04 this also has a new date EOF cat /dev/null > todo.txt test_todo_session 'replace handling priority and prepended date on add' <>> todo.sh -t add "new task" -1: 2009-02-13 new task +1 2009-02-13 new task TODO: 1 added. >>> todo.sh pri 1 A -1: (A) 2009-02-13 new task +1 (A) 2009-02-13 new task TODO: 1 prioritized (A). >>> todo.sh replace 1 this is just a new one -1: (A) 2009-02-13 new task +1 (A) 2009-02-13 new task TODO: Replaced task with: -1: (A) 2009-02-13 this is just a new one +1 (A) 2009-02-13 this is just a new one EOF test_todo_session 'replace with prepended date replaces existing date' <>> todo.sh replace 1 2010-07-04 this also has a new date -1: (A) 2009-02-13 this is just a new one +1 (A) 2009-02-13 this is just a new one TODO: Replaced task with: -1: (A) 2010-07-04 this also has a new date +1 (A) 2010-07-04 this also has a new date EOF test_done diff --git a/tests/t1200-pri.sh b/tests/t1200-pri.sh index b8742e2..c504ef0 100755 --- a/tests/t1200-pri.sh +++ b/tests/t1200-pri.sh @@ -25,7 +25,7 @@ test_todo_session 'basic priority' <>> todo.sh pri 1 B -1: (B) smell the uppercase Roses +flowers @outside +1 (B) smell the uppercase Roses +flowers @outside TODO: 1 prioritized (B). >>> todo.sh list @@ -43,7 +43,7 @@ TODO: 3 of 3 tasks shown TODO: 3 of 3 tasks shown >>> todo.sh pri 2 C -2: (C) notice the sunflowers +2 (C) notice the sunflowers TODO: 2 prioritized (C). >>> todo.sh -p list @@ -54,7 +54,7 @@ TODO: 2 prioritized (C). TODO: 3 of 3 tasks shown >>> todo.sh pri 2 A -2: (A) notice the sunflowers +2 (A) notice the sunflowers TODO: 2 prioritized (A). >>> todo.sh -p list @@ -65,7 +65,7 @@ TODO: 2 prioritized (A). TODO: 3 of 3 tasks shown >>> todo.sh pri 2 a -2: (A) notice the sunflowers +2 (A) notice the sunflowers TODO: 2 prioritized (A). >>> todo.sh -p listpri @@ -75,7 +75,7 @@ TODO: 2 prioritized (A). TODO: 2 of 3 tasks shown >>> todo.sh add "smell the coffee +wakeup" -4: smell the coffee +wakeup +4 smell the coffee +wakeup TODO: 4 added. >>> todo.sh -p list diff --git a/tests/t1400-prepend.sh b/tests/t1400-prepend.sh index 4219b09..e0cc049 100755 --- a/tests/t1400-prepend.sh +++ b/tests/t1400-prepend.sh @@ -31,7 +31,7 @@ TODO: 3 of 3 tasks shown TODO: 3 of 3 tasks shown >>> todo.sh prepend 2 test -2: test notice the sunflowers +2 test notice the sunflowers >>> todo.sh -p list 1 (B) smell the uppercase Roses +flowers @outside @@ -41,7 +41,7 @@ TODO: 3 of 3 tasks shown TODO: 3 of 3 tasks shown >>> todo.sh prepend 1 test -1: (B) test smell the uppercase Roses +flowers @outside +1 (B) test smell the uppercase Roses +flowers @outside >>> todo.sh -p list 1 (B) test smell the uppercase Roses +flowers @outside @@ -54,41 +54,41 @@ EOF test_todo_session 'prepend with &' <>> todo.sh prepend 3 "no running & jumping now" -3: no running & jumping now stop +3 no running & jumping now stop EOF cat /dev/null > todo.txt test_todo_session 'prepend handling prepended date on add' <>> todo.sh -t add "new task" -1: 2009-02-13 new task +1 2009-02-13 new task TODO: 1 added. >>> todo.sh prepend 1 "this is just a" -1: 2009-02-13 this is just a new task +1 2009-02-13 this is just a new task EOF cat /dev/null > todo.txt test_todo_session 'prepend handling priority and prepended date on add' <>> todo.sh -t add "new task" -1: 2009-02-13 new task +1 2009-02-13 new task TODO: 1 added. >>> todo.sh pri 1 A -1: (A) 2009-02-13 new task +1 (A) 2009-02-13 new task TODO: 1 prioritized (A). >>> todo.sh prepend 1 "this is just a" -1: (A) 2009-02-13 this is just a new task +1 (A) 2009-02-13 this is just a new task EOF cat /dev/null > todo.txt test_todo_session 'prepend with prepended date keeps both' <>> todo.sh -t add "new task" -1: 2009-02-13 new task +1 2009-02-13 new task TODO: 1 added. >>> todo.sh prepend 1 "2010-07-04 this is just a" -1: 2009-02-13 2010-07-04 this is just a new task +1 2009-02-13 2010-07-04 this is just a new task EOF test_done diff --git a/tests/t1500-do.sh b/tests/t1500-do.sh index 5c89696..545613b 100755 --- a/tests/t1500-do.sh +++ b/tests/t1500-do.sh @@ -41,9 +41,9 @@ test_todo_session 'basic do' <>> todo.sh do 7,6 -7: x 2009-02-13 remove4 +7 x 2009-02-13 remove4 TODO: 7 marked as done. -6: x 2009-02-13 remove3 +6 x 2009-02-13 remove3 TODO: 6 marked as done. x 2009-02-13 remove3 x 2009-02-13 remove4 @@ -59,9 +59,9 @@ TODO: $HOME/todo.txt archived. TODO: 5 of 5 tasks shown >>> todo.sh do 5 4 -5: x 2009-02-13 remove2 +5 x 2009-02-13 remove2 TODO: 5 marked as done. -4: x 2009-02-13 remove1 +4 x 2009-02-13 remove1 TODO: 4 marked as done. x 2009-02-13 remove1 x 2009-02-13 remove2 @@ -77,7 +77,7 @@ EOF test_todo_session 'fail multiple do attempts' <>> todo.sh -a do 3 -3: x 2009-02-13 stop +3 x 2009-02-13 stop TODO: 3 marked as done. >>> todo.sh -a do 3 diff --git a/tests/t1600-append.sh b/tests/t1600-append.sh index 57ee99e..c00b0fc 100755 --- a/tests/t1600-append.sh +++ b/tests/t1600-append.sh @@ -19,7 +19,7 @@ EOF test_todo_session 'basic append' <>> todo.sh append 1 "smell the roses" -1: notice the daisies smell the roses +1 notice the daisies smell the roses >>> todo.sh list 1 notice the daisies smell the roses @@ -29,7 +29,7 @@ EOF test_todo_session 'basic append with &' <>> todo.sh append 1 "see the wasps & bees" -1: notice the daisies smell the roses see the wasps & bees +1 notice the daisies smell the roses see the wasps & bees >>> todo.sh list 1 notice the daisies smell the roses see the wasps & bees @@ -49,13 +49,13 @@ notice the daisies EOF test_todo_session 'append of current sentence' <>> todo.sh append 1 ", lilies and roses" -1: notice the daisies, lilies and roses +1 notice the daisies, lilies and roses >>> todo.sh append 1 "; see the wasps" -1: notice the daisies, lilies and roses; see the wasps +1 notice the daisies, lilies and roses; see the wasps >>> todo.sh append 1 "& bees" -1: notice the daisies, lilies and roses; see the wasps & bees +1 notice the daisies, lilies and roses; see the wasps & bees EOF cp todo.cfg special-delimiters.cfg @@ -64,13 +64,13 @@ export SENTENCE_DELIMITERS='*,.:;&' EOF test_todo_session 'append of current sentence SENTENCE_DELIMITERS' <>> todo.sh -d special-delimiters.cfg append 1 "&beans" -1: notice the daisies, lilies and roses; see the wasps & bees&beans +1 notice the daisies, lilies and roses; see the wasps & bees&beans >>> todo.sh -d special-delimiters.cfg append 1 "%foo" -1: notice the daisies, lilies and roses; see the wasps & bees&beans %foo +1 notice the daisies, lilies and roses; see the wasps & bees&beans %foo >>> todo.sh -d special-delimiters.cfg append 1 "*2" -1: notice the daisies, lilies and roses; see the wasps & bees&beans %foo*2 +1 notice the daisies, lilies and roses; see the wasps & bees&beans %foo*2 EOF test_done diff --git a/tests/t1700-depri.sh b/tests/t1700-depri.sh index b401c62..fccdde1 100755 --- a/tests/t1700-depri.sh +++ b/tests/t1700-depri.sh @@ -30,7 +30,7 @@ test_todo_session 'basic depriority' <>> todo.sh depri 1 -1: smell the uppercase Roses +flowers @outside +1 smell the uppercase Roses +flowers @outside TODO: 1 deprioritized. >>> todo.sh -p list @@ -55,9 +55,9 @@ test_todo_session 'multiple depriority' <>> todo.sh depri 3 2 -3: stop +3 stop TODO: 3 deprioritized. -2: notice the sunflowers +2 notice the sunflowers TODO: 2 deprioritized. >>> todo.sh -p list diff --git a/tests/t1800-del.sh b/tests/t1800-del.sh index ad8488c..5c150f3 100755 --- a/tests/t1800-del.sh +++ b/tests/t1800-del.sh @@ -34,7 +34,7 @@ test_todo_session 'basic del' <>> todo.sh -f del 1 -1: (B) smell the uppercase Roses +flowers @outside +1 (B) smell the uppercase Roses +flowers @outside TODO: 1 deleted. >>> todo.sh -p list @@ -51,7 +51,7 @@ stop EOF test_todo_session 'del preserving line numbers' <>> todo.sh -f del 1 -1: (B) smell the uppercase Roses +flowers @outside +1 (B) smell the uppercase Roses +flowers @outside TODO: 1 deleted. >>> todo.sh -f del 1 @@ -59,7 +59,7 @@ TODO: 1 deleted. === 1 >>> todo.sh add A new task -4: A new task +4 A new task TODO: 4 added. >>> todo.sh -p list @@ -70,11 +70,11 @@ TODO: 4 added. TODO: 3 of 3 tasks shown >>> todo.sh -f -n del 2 -2: (A) notice the sunflowers +2 (A) notice the sunflowers TODO: 2 deleted. >>> todo.sh add Another new task -3: Another new task +3 Another new task TODO: 3 added. >>> todo.sh -p list @@ -99,9 +99,9 @@ test_todo_session 'basic del TERM' <>> todo.sh del 1 uppercase -1: (B) smell the uppercase Roses +flowers @outside +1 (B) smell the uppercase Roses +flowers @outside TODO: Removed 'uppercase' from task. -1: (B) smell the Roses +flowers @outside +1 (B) smell the Roses +flowers @outside >>> todo.sh -p list 2 (A) notice the sunflowers @@ -111,24 +111,24 @@ TODO: Removed 'uppercase' from task. TODO: 3 of 3 tasks shown >>> todo.sh del 1 "the Roses" -1: (B) smell the Roses +flowers @outside +1 (B) smell the Roses +flowers @outside TODO: Removed 'the Roses' from task. -1: (B) smell +flowers @outside +1 (B) smell +flowers @outside >>> todo.sh del 1 m -1: (B) smell +flowers @outside +1 (B) smell +flowers @outside TODO: Removed 'm' from task. -1: (B) sell +flowers @outside +1 (B) sell +flowers @outside >>> todo.sh del 1 @outside -1: (B) sell +flowers @outside +1 (B) sell +flowers @outside TODO: Removed '@outside' from task. -1: (B) sell +flowers +1 (B) sell +flowers >>> todo.sh del 1 sell -1: (B) sell +flowers +1 (B) sell +flowers TODO: Removed 'sell' from task. -1: (B) +flowers +1 (B) +flowers EOF cat > todo.txt < todo.txt <>> todo.sh del 1 dung -1: (B) smell the uppercase Roses +flowers @outside +1 (B) smell the uppercase Roses +flowers @outside TODO: 'dung' not found; no removal done. === 1 diff --git a/tests/t2000-multiline.sh b/tests/t2000-multiline.sh index 97a9fd3..9a2764f 100755 --- a/tests/t2000-multiline.sh +++ b/tests/t2000-multiline.sh @@ -6,9 +6,9 @@ test_description='Multi-line functionality' ## Replace test # Create the expected file -echo "1: smell the cheese +echo "1 smell the cheese TODO: Replaced task with: -1: eat apples eat oranges drink milk">$HOME/expect.multi +1 eat apples eat oranges drink milk">$HOME/expect.multi test_expect_success 'multiline squash item replace' ' ( @@ -33,7 +33,7 @@ fi ## Add test # Create the expected file -echo "2: eat apples eat oranges drink milk +echo "2 eat apples eat oranges drink milk TODO: 2 added.">$HOME/expect.multi test_expect_success 'multiline squash item add' ' @@ -59,7 +59,7 @@ fi ## Append test # Create the expected file -echo "1: smell the cheese eat apples eat oranges drink milk">$HOME/expect.multi +echo "1 smell the cheese eat apples eat oranges drink milk">$HOME/expect.multi test_expect_success 'multiline squash item append' ' ( @@ -84,7 +84,7 @@ fi ## Prepend test # Create the expected file -echo "1: eat apples eat oranges drink milk smell the cheese">$HOME/expect.multi +echo "1 eat apples eat oranges drink milk smell the cheese">$HOME/expect.multi test_expect_success 'multiline squash item prepend' ' ( @@ -109,11 +109,11 @@ fi ## Multiple line addition # Create the expected file -echo "2: eat apples +echo "2 eat apples TODO: 2 added." > $HOME/expect.multi -echo "3: eat oranges +echo "3 eat oranges TODO: 3 added." >>$HOME/expect.multi -echo "4: drink milk +echo "4 drink milk TODO: 4 added." >> $HOME/expect.multi test_expect_success 'actual multiline add' ' diff --git a/tests/t9999-testsuite_example.sh b/tests/t9999-testsuite_example.sh index 64994e3..ab8ae23 100755 --- a/tests/t9999-testsuite_example.sh +++ b/tests/t9999-testsuite_example.sh @@ -36,7 +36,7 @@ TODO: 2 of 4 tasks shown TODO: 1 of 4 tasks shown >>> todo.sh -a do 2 -2: x 2009-02-13 notice the sunflowers +2 x 2009-02-13 notice the sunflowers TODO: 2 marked as done. >>> todo.sh -p list @@ -48,7 +48,7 @@ TODO: 2 marked as done. TODO: 4 of 4 tasks shown >>> todo.sh add "make the coffee +wakeup" -5: make the coffee +wakeup +5 make the coffee +wakeup TODO: 5 added. >>> todo.sh -p list coffee @@ -58,7 +58,7 @@ TODO: 5 added. TODO: 2 of 5 tasks shown >>> todo.sh add "visit http://example.com" -6: visit http://example.com +6 visit http://example.com TODO: 6 added. >>> todo.sh -p list @@ -98,7 +98,7 @@ usage: todo.sh append ITEM# "TEXT TO APPEND" === 1 >>> todo.sh append 2 and think -2: stop and think +2 stop and think >>> todo.sh -p list 1 (B) smell the uppercase Roses +flowers @outside @@ -136,7 +136,7 @@ TODO: 5 of 5 tasks shown TODO: 5 of 5 tasks shown >>> todo.sh add "the coffee +wakeup" -6: the coffee +wakeup +6 the coffee +wakeup TODO: 6 added. >>> todo.sh -p list @@ -150,7 +150,7 @@ TODO: 6 added. TODO: 6 of 6 tasks shown >>> todo.sh prepend 6 "make" -6: make the coffee +wakeup +6 make the coffee +wakeup >>> todo.sh -p list 1 (B) smell the uppercase Roses +flowers @outside diff --git a/todo.sh b/todo.sh index a1cd28c..94dafca 100755 --- a/todo.sh +++ b/todo.sh @@ -332,12 +332,12 @@ replaceOrPrepend() newtodo=$(sed "$item!d" "$TODO_FILE") case "$action" in replace) - echo "$item: $todo" + echo "$item $todo" echo "TODO: Replaced task with:" - echo "$item: $newtodo" + echo "$item $newtodo" ;; prepend) - echo "$item: $newtodo" + echo "$item $newtodo" ;; esac fi @@ -547,7 +547,7 @@ _addto() { TASKNUM=$(sed -n '$ =' "$file") BASE=$(basename "$file") PREFIX=$(echo ${BASE%%.[^.]*} | tr [a-z] [A-Z]) - echo "$TASKNUM: $input" + echo "$TASKNUM $input" echo "${PREFIX}: $TASKNUM added." fi } @@ -760,7 +760,7 @@ case $action in if sed -i.bak $item" s|^.*|&${appendspace}${input}|" "$TODO_FILE"; then if [ $TODOTXT_VERBOSE -gt 0 ]; then newtodo=$(sed "$item!d" "$TODO_FILE") - echo "$item: $newtodo" + echo "$item $newtodo" fi else die "TODO: Error appending task $item." @@ -795,7 +795,7 @@ case $action in sed -i.bak -e $item"s/^.*//" "$TODO_FILE" fi if [ $TODOTXT_VERBOSE -gt 0 ]; then - echo "$item: $DELETEME" + echo "$item $DELETEME" echo "TODO: $item deleted." fi else @@ -811,13 +811,13 @@ case $action in "$TODO_FILE" newtodo=$(sed "$item!d" "$TODO_FILE") if [ "$DELETEME" = "$newtodo" ]; then - [ $TODOTXT_VERBOSE -gt 0 ] && echo "$item: $DELETEME" + [ $TODOTXT_VERBOSE -gt 0 ] && echo "$item $DELETEME" die "TODO: '$3' not found; no removal done." fi if [ $TODOTXT_VERBOSE -gt 0 ]; then - echo "$item: $DELETEME" + echo "$item $DELETEME" echo "TODO: Removed '$3' from task." - echo "$item: $newtodo" + echo "$item $newtodo" fi fi ;; @@ -841,7 +841,7 @@ case $action in sed -i.bak -e $item"s/^(.) //" "$TODO_FILE" if [ $TODOTXT_VERBOSE -gt 0 ]; then NEWTODO=$(sed "$item!d" "$TODO_FILE") - echo "$item: $NEWTODO" + echo "$item $NEWTODO" echo "TODO: $item deprioritized." fi else @@ -873,7 +873,7 @@ case $action in sed -i.bak $item"s|^|&x $now |" "$TODO_FILE" if [ $TODOTXT_VERBOSE -gt 0 ]; then newtodo=$(sed "$item!d" "$TODO_FILE") - echo "$item: $newtodo" + echo "$item $newtodo" echo "TODO: $item marked as done." fi else @@ -978,7 +978,7 @@ case $action in echo "$MOVEME" >> "$dest" if [ $TODOTXT_VERBOSE -gt 0 ]; then - echo "$item: $MOVEME" + echo "$item $MOVEME" echo "TODO: $item moved from '$src' to '$dest'." fi else @@ -1009,7 +1009,7 @@ note: PRIORITY must be anywhere from A to Z." sed -i.bak -e $item"s/^(.) //" -e $item"s/^/($newpri) /" "$TODO_FILE" if [ $TODOTXT_VERBOSE -gt 0 ]; then NEWTODO=$(sed "$item!d" "$TODO_FILE") - echo "$item: $NEWTODO" + echo "$item $NEWTODO" echo "TODO: $item prioritized ($newpri)." fi else