3 ms·
The code at https://jodavaho.io/posts/bash-journalling.html https://jodavaho.io/posts/bash-journalling.html doesn't work for me. It looks like it is passing vim
by runald 3y ago
The code at https://jodavaho.io/posts/bash-journalling.html 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 "$\*")
}
- jvanderbot 3y agoNot 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 3y agoOh right, why did I say comma.