Journal 2022-07-22
<!-- Morning -->Nushell
I started using Windows for work and nushell
is the one of the most useful
tools I can have, since I am missing the Linux/GNU coreutils
. This is a
one-liner example to clean up merged git
branches. I usually would have
reached for grep
and xargs
to get the job done. Although on Windows they
are missing, I can rewrite it in nu
script:
git branch --merged | lines | str trim | where $it !~ '\*|(master)' | par-each {|br| git branch -d $br}
<!-- What do I want to do today? -->
<!-- Evening -->
<!-- What did I learn today? -->
<!-- Things I learned -->
<!-- Useful tools and libraries -->