1
Fork 0

Introduce -Zterminal-urls to use OSC8 for error codes

Terminals supporting the OSC8 Hyperlink Extension can support inline
anchors where the text is user defineable but clicking on it opens a
browser to a specified URLs, just like `<a href="URL">` does in HTML.

https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda
This commit is contained in:
Esteban Küber 2023-02-09 10:16:00 +00:00
parent a00e24d76a
commit a576514e13
16 changed files with 99 additions and 9 deletions

View file

@ -573,6 +573,7 @@ impl Handler {
None,
flags.macro_backtrace,
flags.track_diagnostics,
TerminalUrl::No,
));
Self::with_emitter_and_flags(emitter, flags)
}
@ -1838,6 +1839,13 @@ pub fn add_elided_lifetime_in_path_suggestion(
);
}
#[derive(Clone, Copy, PartialEq, Hash, Debug)]
pub enum TerminalUrl {
No,
Yes,
Auto,
}
/// Useful type to use with `Result<>` indicate that an error has already
/// been reported to the user, so no need to continue checking.
#[derive(Clone, Copy, Debug, Encodable, Decodable, Hash, PartialEq, Eq, PartialOrd, Ord)]