Issue #21960 has been updated by mame (Yusuke Endoh). Has the reporter confirmed that this change would actually make backtraces clickable in Ghostty? I suspect it would not. I found the relevant Ghostty discussion (I'm surprised it wasn't linked in the description): https://github.com/ghostty-org/ghostty/discussions/11378 Ghostty passes matched strings verbatim to `open` in macOS. It has no `file:line` parser. So even with the space change, the match would stop at `/path/to/file.rb:35`, and `open -t /path/to/file.rb:35` would still fail -- just like `src/example/module.ts:42` fails in the discussion above. Ghostty has a planned `link` config for custom matchers (https://ghostty.org/docs/config/reference#link), but it's marked "TODO: This can't currently be set!" A Ghostty collaborator also suggests tools should emit OSC 8 hyperlinks instead. Either way, changing the colon to a space in Ruby would not help. I have to be blunt: this proposal asks us to break backward compatibility based on an unverified assumption. No one has demonstrated that it actually fixes anything. All pain, no gain. I strongly oppose making this change until Ghostty's `file:line` story is settled and someone can show a concrete improvement. ---------------------------------------- Feature #21960: Improve #backtrace to not confuse terminals https://bugs.ruby-lang.org/issues/21960#change-116800 * Author: svoop (Sven Schwyn) * Status: Open ---------------------------------------- The `#backtrace` of exceptions are currently printed like so: ``` /path/to/whatever.rb:8:in `/' /path/to/whatever.rb:8:in `show' (...) ``` Most terminals recognize `/path/to/whatever.rb:8` as a local file and make it clickable as "open in editor", however, some (e.g. Ghostty) include everything up to the next whitespace, in this case `/path/to/whatever.rb:8:in`. This is then used as an argument to `open` (on macOS) which will not work due to the `:in` part. There are two ways to improve this: ## Replace the colon with a space Given the existence of `#backtrace_locations` which is better suited for programmatically working with backtrace locations, it should not break things to slightly modify the `#backtrace` to look like this: ``` /path/to/whatever.rb:8 in `/' /path/to/whatever.rb:8 in `show' (...) ^^^ space instead of colon ``` ## Add OCS 8 sequences [OCS 8](https://github.com/Alhadis/OSC8-Adoption) are the `<a>` tag for terminal output. While many terminals support it, it might cause visual noise in logs and therefore would have to be an opt-in feature e.g. via a Ruby interpreter argument. -- https://bugs.ruby-lang.org/