title: iterm2 issue : create new tab with same path of previous current tab BUT 2 tabs are clones and not indepedent
body: <p>I have switched from default terminal on MacOS Mojave to <code>iterm2</code>. I have an issue about the opening of a new tab from the current tab.</p>
  <p>Indeed, I would like to be in the same path than the previous current tab.</p>
  <p>For this, I did the classical procedure, i.e to go to <code>iterm2</code> preferences and <code>Profile</code> and choose <code>Reuse previous session's directory</code> for new tab :</p>
  <p><a href="https://i.stack.imgur.com/443Z4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/443Z4.png" alt="enter image description here" /></a></p>
  <p>Then, the issue is that once tab opened, all the other tabs are affected and change from their old path to the path of the new tab:  I don't understand what happens and which option to use to  prevent this behavior.</p>
  <ol>
  <li><p>Every tab is the same than the others: if I do a <code>cd ~/foo/</code>, then the other tabs will go into <code>foo</code>directory.</p>
  </li>
  <li><p>Result worse: if I edit with <code>vim</code> a file in one tab, if I do a <code>cd ~/foo/</code> in another tab, then the tab associated to the edited file disappears is clearing this edition and shows the same windows than the tab where I did <code>cd ~/foo/</code>: very strange.</p>
  </li>
  </ol>
  <p>I want to keep all the current path  for all  others tabs except for the new one which must be the  same than the previous one from which I do a CMD+T.</p>
  <p>I saw on different forums this issue sometimes occurs.</p>
  <h2>Update 1</h2>
  <p>From what I have seen, it seems that I have to find a way to create a new session when I do the shortcut CMD+T to get another tab independent from the current one (from which I do CMD+T).</p>
  <p>But unfortunately, I didn't find how to create a new session in <code>iTerm2</code> (inside the <code>iTerm2 - Preferences - profile</code>, I could execute a script that creates this new session). From the moment, you can see the command (<code>/bin/bash</code> that I launch when I open a new tab:</p>
  <p><a href="https://i.stack.imgur.com/Mds2x.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Mds2x.png" alt="command /bin/bash launched for new tab" /></a></p>
  <p>I tried also to build the binary <code>iTerm2</code> from the sources but issue remains.</p>
  <h2>Update 2</h2>
  <p>I tried to use a little apple script to force a new session to be created from current window:</p>
  <pre><code>tell application &quot;iTerm2&quot;
      tell current window
          create tab with profile &quot;Terminology2&quot;
      end tell
  end tell
  </code></pre>
  <p>(where Terminology2 is a duplicate of profile Terminology (default profile).</p>
  <p>But always the same issue, the 2 tabs are not independent: each command in one of 2 is executed on the another one.</p>
  <h2>Update 3</h2>
  <p>I keep on trying a solution: for this I removed the <code>macport</code> package and hidden files and directory <code>~/.iTerm2/</code>.</p>
  <p>So I downloaded the <code>iTerm2 zip</code> archive from iTerm2 official website.</p>
  <p>Here's a screen capture of my profile :</p>
  <p><a href="https://i.stack.imgur.com/f2ddi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/f2ddi.png" alt="profile" /></a></p>
  <p>Is <code>shortcut key</code> necessary in this profile to open new tabs : the issue seems to come from this option since it may not concern the shortcut for a new tab ? CMD+T is already a shortcut for opening an independent tab, isn't it ?</p>
  <h2>Update 4</h2>
  <p><strong>Solution finally found</strong>. Coming from classic MacOS terminal, I was used to do a shortcut CMD+Shift+-&gt; or CMD+Shift+&lt;- to change of tab.</p>
  <p>But by chance, I tried simply the shortcut CMD+-&gt; or CMD+&lt;- and so was able to switch between 2 tabs independent.</p>
  <p>So this was an error of beginner into iTerm2's world since I was used to apply old classical shortcut of default terminal.</p>
  <p>If someone else makes the same mistake, they will know that it is just a configuration issue of shortcut.</p>