From 3ff0c82b3f586f8d1b9ea17a075e16c95760743e Mon Sep 17 00:00:00 2001 From: Thomas Forgione Date: Fri, 21 Jun 2024 17:32:39 +0200 Subject: [PATCH] Fix bug --- bin/clone-terminal | 2 +- zsh/preserve-cwd-ssh.zsh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/clone-terminal b/bin/clone-terminal index c07e836..e22e255 100755 --- a/bin/clone-terminal +++ b/bin/clone-terminal @@ -5,5 +5,5 @@ WM_NAME=$(xprop -id $WINDOW_ID WM_NAME | cut -d '"' -f 2) if [ -f $HOME/.config/terminalscwd/$WM_NAME.ssh ]; then echo $(cat $HOME/.config/terminalscwd/$WM_NAME.ssh) > ~/toto.txt - alacritty -e sh -c "TERMINAL_UUID=$WM_NAME ssh $(cat $HOME/.config/terminalscwd/$WM_NAME.ssh)" + alacritty -e sh -c "PARENT_TERMINAL=$WM_NAME ssh $(cat $HOME/.config/terminalscwd/$WM_NAME.ssh)" fi diff --git a/zsh/preserve-cwd-ssh.zsh b/zsh/preserve-cwd-ssh.zsh index e3337ec..43e2367 100644 --- a/zsh/preserve-cwd-ssh.zsh +++ b/zsh/preserve-cwd-ssh.zsh @@ -5,8 +5,8 @@ if [ "$PRESERVE_SSH_CWD" = "true" ]; then pwd > $HOME/.config/terminalscwd/$TERMINAL_UUID.pwd } - if [ -f $HOME/.config/terminalscwd/$TERMINAL_UUID.pwd ]; then - cd $(cat $HOME/.config/terminalscwd/$TERMINAL_UUID.pwd) + if [ -f $HOME/.config/terminalscwd/$PARENT_TERMINAL.pwd ]; then + cd $(cat $HOME/.config/terminalscwd/$PARENT_TERMINAL.pwd) else cd fi