SUMMARY For profile "bash", which starts shell Bash, I checked option "Open by direct click" to get possibility of jump directly to line of code in the file I found by grep command. All setting in Mouse tab please find in attached screenshot. I opened new tab with profile "bash". and started grep command to find proper string. One of result was: work.txt:820: ASSERT: "index.isValid()" in file I pressed Ctrl and clicked left mouse button on it. In result I got error that file doesn't exists, where in path was line number (this was reason that file cannot be found) "Unable to run the command specified. The file or folder /path/to/my/file/work.txt:820: does not exist." STEPS TO REPRODUCE 1. Define and open bash profile running shell Bash 2. In configuration for bash profile check following options: Path: "Settings -> Edit current profile -> Mouse -> Miscellaneous": "Underline files", "Open by direct click" 3. run for example "grep -n qt *" in directory where is present file which you want to search 4. in result you should get long list (10 positions) of matching lines in searched file, where file name doesn't start with path. My result was following: "work.txt:820: something qt what matches to search" 5. hold Ctrl (or other configured key short) and click on any file OBSERVED RESULT Cannot open file, because error "The file /path/work.txt:820 does not exist.". Looking at error message it seems that file name is not recognized correctly. EXPECTED RESULT Open file and jump to given line. SOFTWARE/OS VERSIONS Linux/KDE Plasma: YES (available in About System) KDE Plasma Version: 5.20.5 KDE Frameworks Version: 5.78.0 Qt Version: 5.15.2 ADDITIONAL INFORMATION $ grep --version grep (GNU grep) 3.6
Created attachment 135040 [details] konsole - bash_profile - mouse
I think this is related with: https://invent.kde.org/utilities/konsole/-/merge_requests/224
This now (mostly) works for me with Konsole 21.12.0, Frameworks 5.89.0, and Plasma 5.23.5. I can ctrl-click results of grep -n, like: test.txt:5: match and the file test.txt is opened in Kate at line 5, just as expected. This also works for paths which include subdirectories (previously those were not even clickable): dir/test.txt /tmp/dir/test.txt dir/test.txt:5: match /tmp/dir/test.txt:5: match It doesn't however work reliably if the line which matches doesn't start with a whitespace. For example, if I grep for "match" and the line is: test.txt:5:match-n then ctrl-click will work; however if there is a digit in the output: test.txt:5:match-1 then I get "The file or folder /tmp/dir/test.txt:5:match-1 does not exist". It seems to be a problem only for digits, all other printable ASCII characters are fine.