Compare commits
16 Commits
archive/co
...
archive/co
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a5481990fd | ||
|
|
38d75afeff | ||
|
|
ebe6a403c8 | ||
|
|
a6fed991e5 | ||
|
|
94f770926b | ||
|
|
322f3075d2 | ||
|
|
bc81db2f2b | ||
|
|
6259cdb6da | ||
|
|
f76b6d5210 | ||
|
|
c1ad7f3560 | ||
|
|
a777b266ed | ||
|
|
ebce735d04 | ||
|
|
e5a308eb03 | ||
|
|
e600a2162b | ||
|
|
3d0a4d0b30 | ||
|
|
79f428779c |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,3 +1,6 @@
|
|||||||
VERSION-FILE
|
VERSION-FILE
|
||||||
tests/test-results
|
tests/test-results
|
||||||
tests/trash\ directory.*
|
tests/trash\ directory.*
|
||||||
|
done.txt
|
||||||
|
report.txt
|
||||||
|
todo.txt
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ notice the sunflowers +sunflowers @outside @garden +shared +landscape
|
|||||||
(C) 2012-02-28 @outside mow the lawn
|
(C) 2012-02-28 @outside mow the lawn
|
||||||
x 2012-02-21 +herbs @oriental buy spices
|
x 2012-02-21 +herbs @oriental buy spices
|
||||||
x 2012-02-28 2012-02-21 +slack @home watch tv
|
x 2012-02-28 2012-02-21 +slack @home watch tv
|
||||||
|
2012-02-28 +herbs buy cinnamon @grocer
|
||||||
EOF
|
EOF
|
||||||
test_todo_completion 'simple task' 'todo.sh list 1' '"1 # simple task"'
|
test_todo_completion 'simple task' 'todo.sh list 1' '"1 # simple task"'
|
||||||
test_todo_completion 'remove projects and contents from task' 'todo.sh list 2' '"2 # notice the sunflowers"'
|
test_todo_completion 'remove projects and contents from task' 'todo.sh list 2' '"2 # notice the sunflowers"'
|
||||||
@@ -21,5 +22,6 @@ test_todo_completion 'keep priority' 'todo.sh list 3' '"3 # (B) smell the flower
|
|||||||
test_todo_completion 'keep priority and remove timestamp' 'todo.sh list 4' '"4 # (C) mow the lawn"'
|
test_todo_completion 'keep priority and remove timestamp' 'todo.sh list 4' '"4 # (C) mow the lawn"'
|
||||||
test_todo_completion 'keep done marker and remove done date' 'todo.sh list 5' '"5 # x buy spices"'
|
test_todo_completion 'keep done marker and remove done date' 'todo.sh list 5' '"5 # x buy spices"'
|
||||||
test_todo_completion 'keep done marker and remove timestamp and done date' 'todo.sh list 6' '"6 # x watch tv"'
|
test_todo_completion 'keep done marker and remove timestamp and done date' 'todo.sh list 6' '"6 # x watch tv"'
|
||||||
|
test_todo_completion 'remove add date' 'todo.sh list 7' '"7 # buy cinnamon"'
|
||||||
|
|
||||||
test_done
|
test_done
|
||||||
|
|||||||
@@ -58,8 +58,8 @@ _todo()
|
|||||||
# a safety check of the ls action output.
|
# a safety check of the ls action output.
|
||||||
local todo=$( \
|
local todo=$( \
|
||||||
eval TODOTXT_VERBOSE=0 $_todo_sh '-@ -+ -p -x command ls "^ *${cur} "' | \
|
eval TODOTXT_VERBOSE=0 $_todo_sh '-@ -+ -p -x command ls "^ *${cur} "' | \
|
||||||
sed -e 's/^ *[0-9]\+ //' -e 's/\((.) \)[0-9]\{2,4\}-[0-9]\{2\}-[0-9]\{2\} /\1/' \
|
sed -e 's/^ *[0-9]\{1,\} //' -e 's/^\((.) \)\{0,1\}[0-9]\{2,4\}-[0-9]\{2\}-[0-9]\{2\} /\1/' \
|
||||||
-e 's/\([xX] \)\([0-9]\{2,4\}-[0-9]\{2\}-[0-9]\{2\} \)\{1,2\}/\1/' \
|
-e 's/^\([xX] \)\([0-9]\{2,4\}-[0-9]\{2\}-[0-9]\{2\} \)\{1,2\}/\1/' \
|
||||||
-e 's/[[:space:]]*$//' \
|
-e 's/[[:space:]]*$//' \
|
||||||
-e '1q' \
|
-e '1q' \
|
||||||
)
|
)
|
||||||
@@ -85,6 +85,9 @@ complete -F _todo todo.sh
|
|||||||
# If you define an alias (e.g. "t") to todo.sh, you need to explicitly enable
|
# If you define an alias (e.g. "t") to todo.sh, you need to explicitly enable
|
||||||
# completion for it, too:
|
# completion for it, too:
|
||||||
#complete -F _todo t
|
#complete -F _todo t
|
||||||
|
# It is recommended to put this line next to your alias definition in your
|
||||||
|
# ~/.bashrc (or wherever else you're defining your alias). If you simply
|
||||||
|
# uncomment it here, you will need to redo this on every todo.txt update!
|
||||||
|
|
||||||
# If you have renamed the todo.sh executable, or if it is not accessible through
|
# If you have renamed the todo.sh executable, or if it is not accessible through
|
||||||
# PATH, you need to add and use a wrapper completion function, like this:
|
# PATH, you need to add and use a wrapper completion function, like this:
|
||||||
|
|||||||
Reference in New Issue
Block a user