Hacker News new | ask | show | jobs
by babayega2 2307 days ago
Question. Do you know how to get iTerm2 to open on split into the same directory that it was in like in Terminator on Ubuntu? Currently it always open to home directory whether I do a vertical/horizontal split.
2 comments

Go to Preferences->Profiles->Default and find the option over on the right for "Working Directory". Then set it to "Reuse previous session's directory".

Then for me Cmd+D and Cmd+Shift+D (split with current profile) gives the same current directory.

Depending on your workflow, you might even want the advanced configuration version of this.

I want new windows (which I rarely use) and new tabs to be my home directory, but split panes to be the directory I was in when I split. Works wonders.

Like @kevsim mentioned, you have to go advanced options etc, it’s hidden a bit, but it’s there.