Skip to content

Instantly share code, notes, and snippets.

@charlie-collard
Created March 13, 2023 07:56
Show Gist options
  • Save charlie-collard/12d6b4a8049c69c832df7c4fd1d3001d to your computer and use it in GitHub Desktop.
Save charlie-collard/12d6b4a8049c69c832df7c4fd1d3001d to your computer and use it in GitHub Desktop.

Revisions

  1. charlie-collard created this gist Mar 13, 2023.
    9 changes: 9 additions & 0 deletions diary.fish
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    if set -q argv[1]
    set offset $argv[1]
    else
    set offset 0
    end
    if test $offset -ge 0
    set offset +$offset
    end
    vim (date --date="$offset days" +"$HOME/Dropbox/docs/diaries/%Y/%Y-%m-%d-%a.md")