From b58b2630bf126be6b67f2988154c5de284a3e014 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Wed, 30 Oct 2019 10:08:15 -0500 Subject: [PATCH] Updates --- bin/fsw | 6 +++++- bin/termrec | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100755 bin/termrec 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