top | item 36399692

(no title)

runald | 2 years ago

The code at https://jodavaho.io/posts/bash-journalling.html doesn't work for me. It looks like it is passing vim the -d args, which doesn't seem right since -d opens a diff view. I think you misplaced a comma for the date command. I fixed it for me by doing like this:

  function journal() {
    vim $logdir/$(date +%Y-%m-%d -d "$\*")
  }

discuss

order

jvanderbot|2 years ago

Not a comma, but a close-paren. It turns out I had almost precisely that code in my bashrc (had below), so I updated the post to reflect this / your suggestion.

  function journal() {
    vim $logdir/$(date +%Y-%m-%d -d "$*").md
  }
Thanks!

runald|2 years ago

Oh right, why did I say comma.