aboutsummaryrefslogtreecommitdiffstats
path: root/fish/functions/todj.fish
diff options
context:
space:
mode:
authorMatthew Lemon <matt@matthewlemon.com>2022-10-05 16:33:10 +0100
committerMatthew Lemon <matt@matthewlemon.com>2022-10-05 16:33:10 +0100
commit9fff448654308b1e1b3d1129c0255544f56c25cc (patch)
treeeda78717611d7a6b2204ba8e9f73af90e69ae90b /fish/functions/todj.fish
initial
Diffstat (limited to 'fish/functions/todj.fish')
-rw-r--r--fish/functions/todj.fish14
1 files changed, 14 insertions, 0 deletions
diff --git a/fish/functions/todj.fish b/fish/functions/todj.fish
new file mode 100644
index 0000000..7e54dfa
--- /dev/null
+++ b/fish/functions/todj.fish
@@ -0,0 +1,14 @@
+function todj -d "Shows the current daily journal" --argument-names 'vimopt'
+ if test -n "$vimopt"
+ if test $vimopt = "-v"
+ set CMD vim
+ else
+ echo "Do not recognise $vimopt. Did you mean -v?"
+ return
+ end
+ else
+ set CMD cat
+ end
+
+ $CMD $(find /home/lemon/Notes/journal -name "*$(date '+%Y-%m-%d')*")
+end