thought dump

Why dont we start by explaining this command, which i used to create this post:

nvim "thought-dump-$(date '+%Y-%m-%d-%H-%M' | tr -d '\n' | tee >(wl-copy)).md"

Using tee, I can still get the output to stdout while being able to write to a file at the same time. I can leverage this behavior of tee with >(wl-copy). With this I'm still writing to a file (a named pipe to be more accurate eg: /dev/fd/63 ), to which the wl-copy would be listening like wl-copy < /dev/fd/63).


Comments