Skip to content

Commit 0c29624

Browse files
committed
docs: Link out to specifics
1 parent a8be676 commit 0c29624

4 files changed

Lines changed: 8 additions & 3 deletions

File tree

crates/anstyle-hyperlink/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "anstyle-hyperlink"
33
version = "1.0.0"
4-
description = "ANSI escape code hyperlinks"
4+
description = "ANSI escape code hyperlinks (OSC 8)"
55
categories = ["command-line-interface"]
66
keywords = ["ansi", "terminal", "color", "no_std"]
77
repository.workspace = true

crates/anstyle-hyperlink/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# anstyle-hyperlink
22

3-
> ANSI escape code hyperlinks
3+
> ANSI escape code hyperlinks (OSC 8)
44
55
[![Documentation](https://img.shields.io/badge/docs-master-blue.svg)][Documentation]
66
![License](https://img.shields.io/crates/l/anstyle-hyperlink.svg)

crates/anstyle-hyperlink/src/file.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ pub fn path_to_url(path: &std::path::Path) -> Option<String> {
1818
///
1919
/// For hyperlink escape codes, the hostname is used to avoid issues with opening a link scoped to
2020
/// the computer you've SSH'ed into
21+
/// ([reference](https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda#file-uris-and-the-hostname))
2122
pub fn file_to_url(hostname: Option<&str>, path: &std::path::Path) -> Option<String> {
2223
if !path.is_absolute() {
2324
return None;
@@ -51,6 +52,7 @@ pub fn file_to_url(hostname: Option<&str>, path: &std::path::Path) -> Option<Str
5152
///
5253
/// For hyperlink escape codes, the hostname is used to avoid issues with opening a link scoped to
5354
/// the computer you've SSH'ed into
55+
/// ([reference](https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda#file-uris-and-the-hostname))
5456
pub fn dir_to_url(hostname: Option<&str>, path: &std::path::Path) -> Option<String> {
5557
let mut url = file_to_url(hostname, path)?;
5658
if !url.ends_with(URL_PATH_SEP) {

crates/anstyle-hyperlink/src/lib.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
//! ANSI escape code hyperlink
1+
//! ANSI escape code hyperlink (OSC 8)
2+
//!
3+
//! For details on the protocol, see
4+
//! [Hyperlinks (a.k.a. HTML-like anchors) in terminal emulators](https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda)
25
//!
36
//! To detect support, see [supports-hyperlinks](https://crates.io/crates/supports-hyperlinks)
47

0 commit comments

Comments
 (0)