]> git.rmz.io Git - dotfiles.git/commitdiff
zsh: rnr function to add a task to read-and-review urls
authorSamir Benmendil <me@rmz.io>
Sun, 7 Dec 2025 20:52:55 +0000 (20:52 +0000)
committerSamir Benmendil <me@rmz.io>
Sun, 7 Dec 2025 21:27:00 +0000 (21:27 +0000)
zsh/lib/50-taskwarrior.zsh

index 4e6c8487a6802616c581d82e14dbb1c5fc85da5e..fc5b0c394cf3a3f50f9fb7caaa840b91b9a07f42 100644 (file)
@@ -38,6 +38,15 @@ function turg() {
     task $urg_task $@
 }
 
     task $urg_task $@
 }
 
+function rnr() {
+    # Taken from https://cs-syd.eu/posts/2015-07-05-gtd-with-taskwarrior-part-4-processing
+    local link="$1"
+    title=$(curl --silent "$link" | htmlq --text title)
+    descr="'$title'"
+    task add +in +rnr $descr
+    task +LATEST annotate "$link"
+}
+
 # TODO: function to show the latest report
 
 function task_today_list() {
 # TODO: function to show the latest report
 
 function task_today_list() {