Prevent bug when PARENT_TERMINAL is empty
This commit is contained in:
parent
feebba4e12
commit
1facb0079a
|
@ -25,13 +25,16 @@ if [ "$PRESERVE_SSH_CWD" = "true" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Copy state for new terminal
|
# Copy state for new terminal
|
||||||
|
if [ ! -z $PARENT_TERMINAL ]; then
|
||||||
if [ -f $HOME/.config/terminalscwd/$PARENT_TERMINAL.cwd ]; then
|
if [ -f $HOME/.config/terminalscwd/$PARENT_TERMINAL.cwd ]; then
|
||||||
cp $HOME/.config/terminalscwd/$PARENT_TERMINAL.cwd $HOME/.config/terminalscwd/$TERMINAL_UUID.cwd
|
cp $HOME/.config/terminalscwd/$PARENT_TERMINAL.cwd $HOME/.config/terminalscwd/$TERMINAL_UUID.cwd
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f $HOME/.config/terminalscwd/$PARENT_TERMINAL.ssh ]; then
|
if [ -f $HOME/.config/terminalscwd/$PARENT_TERMINAL.ssh ]; then
|
||||||
|
echo $HOME/.config/terminalscwd/$PARENT_TERMINAL.ssh $HOME/.config/terminalscwd/$TERMINAL_UUID.ssh
|
||||||
cp $HOME/.config/terminalscwd/$PARENT_TERMINAL.ssh $HOME/.config/terminalscwd/$TERMINAL_UUID.ssh
|
cp $HOME/.config/terminalscwd/$PARENT_TERMINAL.ssh $HOME/.config/terminalscwd/$TERMINAL_UUID.ssh
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# When we're done, delete the uuid files
|
# When we're done, delete the uuid files
|
||||||
preserve_ssh_cleanup() {
|
preserve_ssh_cleanup() {
|
||||||
|
|
Loading…
Reference in New Issue