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.
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.
Bash themes(Bash-it): https://github.com/Bash-it/bash-it/wiki/Themes
Zsh themes(oh-my-zsh): https://github.com/robbyrussell/oh-my-zsh/wiki/Themes