Semantic History not working in tmux
- iTerm2 version: 3.2.6
- OS version: 10.14.1
- tmux version: 2.7
- Attach plist: com.googlecode.iterm2.plist
- Attach a debug log: debuglog.txt
Detailed steps to reproduce the problem:
- Setup semantic history to "Run coprocess...":
echo cat \1
- Start tmux:
tmux
- Navigate away from starting directory:
cd projects/test
- Display directory contents:
ls
- Cmd+click filename
test-in-test-project-dir.txt
What happened:
Filename was treated as a URL, default browser opened attempting to navigate to test-in-test-project-dir.txt/
What should have happened: Output file contents
It works as expected outside of tmux, I'm really just curious if this is a known problem and semantic history isn't expected to work in tmux. I found some people claiming it worked a few years ago.
From the logs it looks like iterm isn't keeping up with the changes to the path, it's looking for the file I clicked in ~
when I'm actually in ~/projects/test
. The file doesn't exist, so it falls back to treating it as a URL. (?)
What I really want is to run the coprocess echo vim \1
, and I'd be happy for it to just use the actual text on screen, as opposed to the full path, even if that meant I'd have to be in that directory for it to work. I understand that this isn't how semantic history works though, and may be something I could set up with "Smart Selection" instead.
I've tried this in the latest beta (3.2.7beta3), via the tmux integration feature (tmux -CC
), and also by setting up a separate tmux
profile; the behaviour remains as described.
The attached debug log just performs the failure case, I created a version with the successful attempts before starting tmux, and then in tmux but before navigating away from the initial directory, but the logs were >10MB so I couldn't attach them. Please let me know if there's any more information that would be useful.