From 06adfc5bff029e1c69a11ba9fb15c18e2dbfd808 Mon Sep 17 00:00:00 2001 From: Ryan Roden-Corrent Date: Wed, 6 Jul 2016 08:04:06 -0400 Subject: [PATCH] Leverage +LATEST in taskadd userscript. This is cleaner than parsing the output of `task`. --- misc/userscripts/taskadd | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/misc/userscripts/taskadd b/misc/userscripts/taskadd index 99f2a35b7..a60dbcdd7 100755 --- a/misc/userscripts/taskadd +++ b/misc/userscripts/taskadd @@ -28,11 +28,8 @@ msg="$(task add $title $@ 2>&1)" 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 - task $num annotate "$QUTE_URL" + task +LATEST annotate "$QUTE_URL" echo "message-info '$msg'" >> $QUTE_FIFO else echo "message-error '$msg'" >> $QUTE_FIFO