A cross-platform file change monitor with multiple backends: Apple OS X File System Events, *BSD kqueue, Solaris/Illumos File Events Notification, Linux inotify, Microsoft Windows and a stat()-based backend.
launch_do() {
local TITLE="wm_custom_launcher"
open -n -a "/Applications/Alacritty.app" \
--args -t "${TITLE}" \
-e "launcher-filter" "${TITLE}" # -e launch_filter
local ect=0
fswatch -0 /tmp/$TITLE | while read -d "" event
do \
ect=$(( $ect + 1 ))
echo "e$ect: ${event}"
if test "$ect" = "2"; then
# it turns out my value is always written on second event.
local rt=$(cat "/tmp/${TITLE}")
echo "rt: $rt"
# break
exit
fi
done
echo "outside..."
}
I spawn a new terminal instance and writes it's results to a tmp file. rt echoes correctly but it doesn't break or exit?
What am I doing wrong?
Hi there,
why doesn't this exit the command
I spawn a new terminal instance and writes it's results to a tmp file.
rt
echoes correctly but it doesn't break or exit? What am I doing wrong?