zsh and it seems that a new tab should open in the same dir as the previous. However, that is not happening.
Do I have to add anything to the
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.Sign up to join this community
You are probably using the "tabs" in a terminal emulator like gnome-terminal? Understand that a new tab is nearly indistinguishable from a new terminal window. It runs a new instance of the shell which executes its start up files. The startup files do not know about any other shell instances, let alone what gnome-terminal they belong to or which current working directory that shell might be in. Another issue: with several open shells in different directories, which directory should the new shell start in?
That said, you could make each
cd save the target directory in say
~/.cd and change there in the startup file. Left as an exercise to the reader :-)
PS: Be sure to save the absolute path of the target directory, not some relative arg to