Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iTerm2 "Cmd + Click" to open file doesn't work under Tmux session

Tags:

macos

iterm2

tmux

I'm using iTerm2 with a Tmux session connecting to localhost Tmux server. On a normal iTerm2 window/tab, I can use Cmd + Click to open a file with its default app. However, it's not working in the Tmux session. Instead of opening the file in its default app, iTerm2 always opens it as a URL, in the default browser.

Does anyone know a fix to this? Or I'm having something wrong with my Tmux configuration?

like image 524
Ngoc Pham Avatar asked Nov 23 '22 16:11

Ngoc Pham


1 Answers

I found the answer on apple.stackexchange.com:

To use the normal mouse behavior in tmux you have to keep alt pressed. So click on the link while pressing cmd+alt. The same applies when selecting text.

Source: https://apple.stackexchange.com/a/147129/111777

like image 56
Angra Mainyu Avatar answered Dec 23 '22 10:12

Angra Mainyu