How to make a new terminal tab open in the same directory the current one?

I want to press "apple + T" to open a new terminal tab. This terminal tab must be in the same directory as the current one. Anyone knows how to do that?

Thanks a lot!

Hi.

I don't think it's possible just by using cmd-T.

But you could try some AppleScript.

If you put this script (in this case in the $HOME directory), then set up a keyboard short-cut in Terminal Preferences (Keyboard, then +) (see attachments) to run it:

osascript <<!
  tell app "terminal" to do script "cd '$(pwd)'" 
!

Or, of course, you could just run it from the command line.

1 Like