I am working with a developer setup so that I run my code in a docker container and be able to edit it locally (via volume). Local path is e.g. /path/to/my/project
while inside docker container it is /app/source
.
Say I have a file relative to the project called app/models/team.rb
.
On an error in the container I see an output like this:
/app/source/app/models/team.rb:13:in my_method...
iTerm seemed to be smart about the open on ⌘-click such that it underlined only the app/models/team.rb:13
(incl. line number) when I hover over the a
of app (unfortunately only on the first character), and opened the local file in my editor (VSCode). That was already great.
I now added an iTerm profile that identifies when a session is running inside docker (greedy: auto profile switching checking for "&docker
") and sets the hostname and path via Triggers and regex (besides colors etc). This also works fine.
However now when I hover over the filename, the whole path is underlined and when I ⌘-click, iTerm tries to download via scp
(which fails).
How can I avoid iTerm to try to scp the file and make it realize again how to load the local file?
I already tried not to set the hostname, but this results in iTerm not providing anything anymore for opening. When I don't set the path then it's working like before of course, but I'd like to have this information of the docker container in the status bar.