The words Under construction in black text on a yellow background with diagonal black stipes surrounding it
I'm in the process of moving my site. It's still a work in progress. Please excuse the mess and broken links.

Shortcut Command To Watch A File For Changes

TODO: Pull subtitle into page object

These are old notes.

I'm using watchexec now

I load this in my dotfiles to provide a `watch PATH`` command that prints out a file to the terminal every time it changes.

Code
function watch () {
    fswatch -event UPDATE -0 "$1" | xargs -0 -n1 cat
}

Debugging Stuff

I'm moving stuff around right now. All this below is helping me figure out where to put stuff

        -- title

Shortcut Command To Watch A File For Changes

-- warning

These are old notes. 

I'm using watchexec now


-- p

I load this in my dotfiles to provide a 
`watch PATH`` command that prints out a file 
to the terminal every time it changes.

-- code
-- bash 

function watch () {
    fswatch -event UPDATE -0 "$1" | xargs -0 -n1 cat
}

-- todo

[] 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

-- categories
-- Command Line
-- dotfiles

-- metadata
-- date: 2022-10-20 21:49:54
-- id: 2gqnkz4s
-- site: aws
-- status: published 
-- type: post