Fix bug on cd ""
This commit is contained in:
parent
6ba78c412b
commit
8af310d0a2
|
@ -5,7 +5,12 @@ if [ "$PRESERVE_SSH_CWD" = "true" ]; then
|
||||||
|
|
||||||
# Alias for cd: when we change directory, we write the new cwd in the file corresponding to the terminal uuid
|
# Alias for cd: when we change directory, we write the new cwd in the file corresponding to the terminal uuid
|
||||||
cd() {
|
cd() {
|
||||||
builtin cd "$1"
|
if [ -z "$1" ]; then
|
||||||
|
directory=$HOME
|
||||||
|
else
|
||||||
|
directory="$1"
|
||||||
|
fi
|
||||||
|
builtin cd "$directory"
|
||||||
pwd > $HOME/.config/terminalscwd/$TERMINAL_UUID.cwd
|
pwd > $HOME/.config/terminalscwd/$TERMINAL_UUID.cwd
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue