diff --git a/scripts/launch_alacritty.sh b/scripts/launch_alacritty.sh index 28cfa4d..0708db9 100755 --- a/scripts/launch_alacritty.sh +++ b/scripts/launch_alacritty.sh @@ -14,9 +14,9 @@ if [ $RUNNING_SSH == true ]; then PORT=$(ss -tnpa | grep ssh | grep "pid=$CHILD_PID" | awk '{ print $4 }' | grep -o '[0-9]*$') alacritty -e ssh $CLIENT -t "cd \"\$(readlink -e /proc/\$(cat /tmp/ssh_session_$PORT)/cwd)\"; zsh --login" else - if [ $(ps -p $1 -o comm=) == "alacritty" ]; then + if [ "$(ps -p $1 -o comm=)" == "alacritty" ]; then CWD=$(readlink -e /proc/$CHILD_PID/cwd) - if [ $CWD != "" ]; then + if [ "$CWD" != "" ]; then alacritty --working-directory "$CWD" else alacritty