]> git.proxmox.com Git - rustc.git/blob - vendor/supports-hyperlinks/README.md
New upstream version 1.75.0+dfsg1
[rustc.git] / vendor / supports-hyperlinks / README.md
1 Detects whether the current terminal supports [hyperlinks in terminal
2 emulators](https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda).
3
4 It tries to detect and support all known terminals and terminal families that
5 support this. If a declaration is wrong, missing, or could be improved, please
6 send a PR!
7
8 ## Example
9
10 The API is super simple!
11
12 ```rust
13 use supports_hyperlinks::Stream;
14
15 if supports_hyperlinks::on(Stream::Stdout) {
16 println!("This terminal supports hyperlinks on stdout");
17 } else {
18 println!("No hyperlinks, please");
19 }
20 ```
21
22 And that's it!
23
24 ## Forcing hyperlinks in tools that use `supports-hyperlinks`
25
26 You may set the `FORCE_HYPERLINK` environment variable to force
27 `supports-hyperlinks` to return true for its checks. If the value is `0`, this
28 will force it to be _false_, instead.