Issue #21960 has been updated by svoop (Sven Schwyn). You're right about `open` failing on line numbers, @mame, sorry for the confusion. I was experimenting with a wrapper for `open` higher up in the $PATH and accidentally hit it – which looked as if `open` handled line numbers correctly. Ghostty is just the reason I tripped over the colon, by no means a good reason for such a change. However, as @byroot mentioned, there are likely more situations where the second colon causes hickups. For instance, Zed does support a second colon: ``` Arguments: [PATHS_WITH_POSITION]... The paths to open in Zed (space-separated). Use `path:line:column` syntax to open a file at the given line and column. ``` No idea what Zed makes of `:in` for a column, but I'd be happy to investigate further if there's any interest. Please just close this issue otherwise. ---------------------------------------- Feature #21960: Improve #backtrace to not confuse terminals https://bugs.ruby-lang.org/issues/21960#change-116807 * 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/