Taking a look at the other GNU programs that implement hyperlinks for terminals [1]:* Emacs accepts both (see lisp/ansi-osc.el). * Groff emits \e. * GCC emits \a, the rationale can be seen in a comment (bear in mind the commit was from 2019 so things may have changed): $ git diff ae169f9e4cbb5a1f1767106d86f322d166d5189d^ ae169f9e4cbb5a1f1767106d86f322d166d5189d [...] - > OSC (operating system command) is typically ESC ]. */ + > OSC (operating system command) is typically ESC ]. + + Use BEL instead of ST, as that is currently rendered better in some + terminal emulators that don't support OSC 8, like konsole. */ * wget2 emits \e. Not sure if you knew that already or if it makes you reconsider, just thought it was worth looking into. I use Gnome terminal which supports both, so I do not feel very strongly about the change either way. :)
I think when we added ls --hyper 9 years ago the decision was different, but not the more standardized approach seems best.
Also, isn't \e is a GCC extension and not standardized, see C23 § 5.2.3. I assume it is widly supported, but am not 100% sure on that. You might want to use \033 instead.
Good, point! Adjusted locally. thanks, Padraig
