Compare commits
2 Commits
archive/pr
...
archive/co
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
56bd927747 | ||
|
|
8f92cb6f66 |
6
todo.sh
6
todo.sh
@@ -324,8 +324,8 @@ replaceOrPrepend()
|
|||||||
cleaninput $input
|
cleaninput $input
|
||||||
|
|
||||||
# Retrieve existing priority and prepended date
|
# Retrieve existing priority and prepended date
|
||||||
priority=$(sed -e "$item!d" -e $item's/^\(([A-Z]) \)\{0,1\}\([0-9]\{2,4\}-[0-9]\{2\}-[0-9]\{2\} \)\{0,1\}.*/\1/' "$TODO_FILE")
|
priority=$(sed -e "$item!d" -e $item's/^\((.) \)\{0,1\}\([0-9]\{2,4\}-[0-9]\{2\}-[0-9]\{2\} \)\{0,1\}.*/\1/' "$TODO_FILE")
|
||||||
prepdate=$(sed -e "$item!d" -e $item's/^\(([A-Z]) \)\{0,1\}\([0-9]\{2,4\}-[0-9]\{2\}-[0-9]\{2\} \)\{0,1\}.*/\2/' "$TODO_FILE")
|
prepdate=$(sed -e "$item!d" -e $item's/^\((.) \)\{0,1\}\([0-9]\{2,4\}-[0-9]\{2\}-[0-9]\{2\} \)\{0,1\}.*/\2/' "$TODO_FILE")
|
||||||
|
|
||||||
if [ "$prepdate" -a "$action" = "replace" ] && [ "$(echo "$input"|sed -e 's/^\([0-9]\{2,4\}-[0-9]\{2\}-[0-9]\{2\}\)\{0,1\}.*/\1/')" ]; then
|
if [ "$prepdate" -a "$action" = "replace" ] && [ "$(echo "$input"|sed -e 's/^\([0-9]\{2,4\}-[0-9]\{2\}-[0-9]\{2\}\)\{0,1\}.*/\1/')" ]; then
|
||||||
# If the replaced text starts with a date, it will replace the existing
|
# If the replaced text starts with a date, it will replace the existing
|
||||||
@@ -1020,7 +1020,7 @@ case $action in
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
## No priority specified; show all priority tasks
|
## No priority specified; show all priority tasks
|
||||||
pri="[[:upper:]]"
|
pri="[A-Z]"
|
||||||
fi
|
fi
|
||||||
pri="($pri)"
|
pri="($pri)"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user