Search code examples
macositerm2

How to open working directory of a file showing on iterm2 by mouse?


There is a file showing on iTerm2 screen as below

test.txt 

I want to open working directory of this file using iTerm2. But ⌘-click only opens files but not its working directory on Finder. I do not find any keys or method from iTerm2 to get this.


Solution

  • You can install bash/zsh themes(depending on what shell you use) that show the current directory in the shell prompt. You can then ⌘-click on that.