]> git.rmz.io Git - dotfiles.git/commitdiff
zsh: add todo function to list TODOs in org
authorSamir Benmendil <me@rmz.io>
Sat, 15 Feb 2020 22:37:37 +0000 (22:37 +0000)
committerSamir Benmendil <me@rmz.io>
Sat, 15 Feb 2020 22:37:37 +0000 (22:37 +0000)
zsh/functions/todo [new file with mode: 0644]
zsh/lib/motd.zsh

diff --git a/zsh/functions/todo b/zsh/functions/todo
new file mode 100644 (file)
index 0000000..142719e
--- /dev/null
@@ -0,0 +1,4 @@
+function todo() {
+    cd ~/org
+    grep --color=always '* TODO' *.org
+}
index 1c6e9e4349ef31ac018dc4c8321b0ac854cab493..8821c16723270f8ef87ae018c936325759aea9a5 100644 (file)
@@ -11,4 +11,4 @@ msg()
 }
 
 # 44 seems to be the number of color escape characters used by grep
-grep "* TODO" org/* --color=always | cut -c-$((COLUMNS + 44))
+todo | cut -c-$((COLUMNS + 44))