summaryrefslogtreecommitdiff
path: root/config/essentials/shell/functions.sh
diff options
context:
space:
mode:
Diffstat (limited to 'config/essentials/shell/functions.sh')
-rw-r--r--config/essentials/shell/functions.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/config/essentials/shell/functions.sh b/config/essentials/shell/functions.sh
index 8172c73..1fd6e92 100644
--- a/config/essentials/shell/functions.sh
+++ b/config/essentials/shell/functions.sh
@@ -332,3 +332,14 @@ serve() {
}
ssh_keyadd() { ssh-keygen -f "$HOME"/.ssh/"$1" -P "$(pass generate -f keys/"$HOST"/ssh/"$1" | tail -n 1)" -t ed25519; }
+
+
+fchange()
+{
+ [ "$1" ] || return 1
+ inotifywait -m -e create,modify,delete --format "%f" "${2:-.}" |
+ while read -r EVENT
+ do
+ eval "$1"
+ done
+}