Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create New Tab Sessions with the same working Directory

Tags:

iterm

iterm2

Often in workflow you are working within a directory and then need to create a second terminal or session to the same directory.

TAB 1 #~/home cd really #~/home/really cd long #~/home/really/long cd filepath #~/home/really/long/filepath node filepath #session now occupied   #new TAB #CTR + T #~/home #I want to be in the same filepath  

is there a setting somewhere to do this?

like image 357
StanleyZheng Avatar asked Mar 31 '14 16:03

StanleyZheng


2 Answers

One of the options for a profile is which directory to use when creating a session with that profile. The default is to use your home directory, but you can change that to use the previous directory instead. You can change this setting in the default profile (allowing you to continue using -T), or you can create a new profile which uses this setting, and assign a different keyboard shortcut to create a session with that profile.

like image 180
chepner Avatar answered Oct 04 '22 22:10

chepner


Preferences->Profiles->Working Directory->Reuse previous session's directory

like image 38
Jialin Avatar answered Oct 04 '22 22:10

Jialin