Dotfiles, utilities, and other apparatus.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

18 lines
575 B

if [ ! -z "$1" ]; then
# Take the basename of the file passed in, i.e. something like
# /home/brennen/notes/vimwiki/diary/, slice off the extension,
# and treat it as a seed date:
date="$(basename -s .wiki "$1")"
date="$(basename -s .md "$date")"
datestamp="$(date --date="$date" -I)"
# No filename given, nothing to work with, just use today:
datestamp="$(date -I)"
echo '== log =='
echo "{{{exec-raw cd ~/notes && find ./vimwiki/log -name '${datestamp}*.wiki' | sort | xargs grep --with-filename '%title'"
echo '}}}'