Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Split pane to cwd

Tags:

iterm2

I often want to start a persistent process from a particular directory and be able to monitor it, while still keeping a command line in that directory for other commands. My current workflow is to cmd + shift + d to split panes, but the cwd of the new pane is back at home, and I need to cd back to where I was. Is there a good way to split panes and automatically set cwd of the new pane to the same directory as the pane it was split from?

like image 215
IanVS Avatar asked Apr 12 '16 13:04

IanVS


1 Answers

lanVS's solution works out, but there may be a side effect that you don't want: If you open new tab/windows, it will reuse previous session's directory.

So if you just want the new split pane to act like that, you can do that:

  1. open "Preferences", select "Profiles"
  2. select the profile you want to change
  3. go to "General" subtab
  4. set Working Directory to "Advanced Configuration"
  5. click "Edit..."
  6. select "Reuse previous session's directory" for option "Working Directory for New Split Panes"
like image 164
sel-fish Avatar answered Oct 16 '22 08:10

sel-fish