diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-05-03 18:22:38 +0200 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-05-03 18:22:38 +0200 |
commit | 80462e764abf047544be6026c5d67c1f54599ae5 (patch) | |
tree | 0c018ce1a0b0b5d186eb9db5881c99271c8f3745 /config/essentials/shell/functions.sh | |
parent | 4cf668d9a23e39fbc8a215cc7876f95291722366 (diff) |
Update
Diffstat (limited to 'config/essentials/shell/functions.sh')
-rw-r--r-- | config/essentials/shell/functions.sh | 11 |
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 +} |