I added these commands to my ~/.bashrc to open a terminal in the same directory where i closed my last terminal:

_copy() { echo "$1" | xclip -selection clipboard; }
_paste() { xclip -selection clipboard -o 2>/dev/null; }
_copy_pwd() { _copy $PWD; }
trap '_copy_pwd' EXIT
_bashrc_sourced() {
    ! [ -v BASH_SOURCED ] && { export BASH_SOURCED=0; return 0; } || return 1
}
restore_pwd() {
    if _bashrc_sourced; then  cd $(_paste) 2>/dev/null; fi
}
restore_pwd

These commands have saved me thousands of keystrokes. Without them, i’d have to type cd ... every time i open a new terminal, how innefficient is that?. For this to work you’d need to install xclip.