From a2cfb6637d250bb19d1fc4cba46352bc354984c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Av=C3=A9?= Date: Tue, 12 Dec 2023 19:46:42 +0100 Subject: [PATCH] Fix launch_alacritty script --- scripts/launch_alacritty.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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