I have output in my iTerm like:
File project/path/path/file.py:56:54 extra text information
How I can open this file in IntelliJ with a s
I can confirm the following command is working with or without line numbers, when entered into iTerm2 > Preferences > Profiles > Advanced > Semantic History > Run Command:
[ -z \2 ] && /usr/local/bin/idea \1 || /usr/local/bin/idea --line \2 \1
This makes use of the fact that IntelliJ IDEA installs a command line launcher python script idea to /usr/local/bin, and requires the project in which the file resides to be open (multiple projects can be open, and it will still find the correct one.)
The command checks to see if the line number argument \2 is blank; if it is, it will exclude the line number, otherwise it will specify it with --line. \1 is the filename including the path.
To see all the available options for idea:
/usr/local/bin/idea --help
Environment: