1
0
Fork
You've already forked supports-hyperlinks
0
Detect whether the current terminal supports rendering hyperlinks
  • Rust 100%
2024年11月26日 01:12:32 -08:00
.github meta: add FUNDING.yml 2021年09月11日 01:04:35 -07:00
src feat(term_programs): add ghostty as a supported terminal ( #5 ) 2024年07月31日 13:12:12 -07:00
.editorconfig feat(api): initial commit 2021年09月10日 21:02:17 -07:00
.gitignore feat(api): initial commit 2021年09月10日 21:02:17 -07:00
Cargo.toml chore: Release supports-hyperlinks version 3.1.0 2024年11月26日 01:12:32 -08:00
CHANGELOG.md docs: update changelog 2024年11月26日 01:11:33 -08:00
cliff.toml meta: fix changelog rendering 2021年09月15日 18:56:49 -07:00
LICENSE feat(api): initial commit 2021年09月10日 21:02:17 -07:00
Makefile.toml feat(api): initial commit 2021年09月10日 21:02:17 -07:00
README.md docs: document new msrv 2024年02月03日 19:10:27 -08:00

Detects whether the current terminal supports hyperlinks in terminal emulators.

It tries to detect and support all known terminals and terminal families that support this. If a declaration is wrong, missing, or could be improved, please send a PR!

Example

The API is super simple!

usesupports_hyperlinks::Stream;ifsupports_hyperlinks::on(Stream::Stdout){println!("This terminal supports hyperlinks on stdout");}else{println!("No hyperlinks, please");}

And that's it!

You may set the FORCE_HYPERLINK environment variable to force supports-hyperlinks to return true for its checks. If the value is 0, this will force it to be false, instead.

MSRV

The minimum supported Rust version is 1.70.0.