Shortcut Command To Watch A File For Changes
Warning
These are old notes.
I'm using watchexec now
I load this in my dotfiles to provide a [TODO: Code shorthand span ] command that prints out a file to the terminal every time it changes.
function watch () {
fswatch -event UPDATE -0 "$1" | xargs -0 -n1 cat
}
-
[]
Update this so that if no argument is passed in it doesn't try to watch the entire system (or whatever it would do if there's no path)
-
[]
link to the file that shows how to execute the file when it changes
~ fin ~