diff --git a/bin/fsw b/bin/fsw index 7bd9f8b..71d177a 100755 --- a/bin/fsw +++ b/bin/fsw @@ -1,7 +1,11 @@ #!/usr/bin/env bash +# Some examples in case you forget: +# Elixir: fsw "mix run" ./**/*.{ex,exs} +# Run bash file on any event (note single quotes): fsw 'bash ${__FSW_FILENAME}' ./**/*.bash + SHELL_COMMAND="${1}" shift -inotifywait -q -m -e close_write -r "${@}" | while read -r _ _; do +inotifywait -q -m -e close_write -r "${@}" | while read -r __FSW_FILENAME __FSW_EVENT; do eval "${SHELL_COMMAND}" done diff --git a/bin/termrec b/bin/termrec new file mode 100755 index 0000000..d4a6e62 --- /dev/null +++ b/bin/termrec @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +asciinema rec -i 2 --stdin