Leverage +LATEST in taskadd userscript.
This is cleaner than parsing the output of `task`.
This commit is contained in:
parent
6ce3ad68f8
commit
06adfc5bff
@ -28,11 +28,8 @@
|
|||||||
msg="$(task add $title $@ 2>&1)"
|
msg="$(task add $title $@ 2>&1)"
|
||||||
|
|
||||||
if [[ $? == 0 ]]; then
|
if [[ $? == 0 ]]; then
|
||||||
# scan the output for the new task number
|
|
||||||
num=$(echo $msg | sed -r 's/Created task ([0-9]+)\./\1/')
|
|
||||||
|
|
||||||
# annotate the new task with the url, send the output back to the browser
|
# annotate the new task with the url, send the output back to the browser
|
||||||
task $num annotate "$QUTE_URL"
|
task +LATEST annotate "$QUTE_URL"
|
||||||
echo "message-info '$msg'" >> $QUTE_FIFO
|
echo "message-info '$msg'" >> $QUTE_FIFO
|
||||||
else
|
else
|
||||||
echo "message-error '$msg'" >> $QUTE_FIFO
|
echo "message-error '$msg'" >> $QUTE_FIFO
|
||||||
|
Loading…
Reference in New Issue
Block a user