summaryrefslogtreecommitdiffstats
path: root/zellij-utils/src
diff options
context:
space:
mode:
authora-kenji <aks.kenji@protonmail.com>2021-10-25 20:08:30 +0200
committerGitHub <noreply@github.com>2021-10-25 20:08:30 +0200
commita2a0299ea54e0b5b81a8770926e53d75f373abed (patch)
treecdb383bd95fb5443080bd1e912cdd9ad7fd5d064 /zellij-utils/src
parente1dab60d4f199b24bf71e76653980cfd219e567e (diff)
add(setup): change the links to be hyperlinks (#768)
- change the links in the setup command to be viable hyperlinks according to: https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda
Diffstat (limited to 'zellij-utils/src')
-rw-r--r--zellij-utils/src/setup.rs26
1 files changed, 24 insertions, 2 deletions
diff --git a/zellij-utils/src/setup.rs b/zellij-utils/src/setup.rs
index 975ff333c..1ca596ffc 100644
--- a/zellij-utils/src/setup.rs
+++ b/zellij-utils/src/setup.rs
@@ -266,6 +266,12 @@ impl Setup {
.clone()
.or_else(|| config_dir.clone().map(|p| p.join(CONFIG_NAME)));
+ // according to
+ // https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda
+ let hyperlink_start = "\u{1b}]8;;";
+ let hyperlink_mid = "\u{1b}\\";
+ let hyperlink_end = "\u{1b}]8;;\u{1b}\\\n'";
+
let mut message = String::new();
message.push_str(&format!("[Version]: {:?}\n", VERSION));
@@ -310,10 +316,26 @@ impl Setup {
message.push_str(&format!("[ARROW SEPARATOR]: {}\n", ARROW_SEPARATOR));
message.push_str(" Is the [ARROW_SEPARATOR] displayed correctly?\n");
message.push_str(" If not you may want to either start zellij with a compatible mode 'zellij options --simplified-ui'\n");
- message.push_str(" Or check the font that is in use:\n https://zellij.dev/documentation/compatibility.html#the-status-bar-fonts-dont-render-correctly\n");
+ let mut hyperlink_compat = String::new();
+ hyperlink_compat.push_str(hyperlink_start);
+ hyperlink_compat.push_str("https://zellij.dev/documentation/compatibility.html#the-status-bar-fonts-dont-render-correctly");
+ hyperlink_compat.push_str(hyperlink_mid);
+ hyperlink_compat.push_str("https://zellij.dev/documentation/compatibility.html#the-status-bar-fonts-dont-render-correctly");
+ hyperlink_compat.push_str(hyperlink_end);
+ message.push_str(&format!(
+ " Or check the font that is in use:\n {}\n",
+ hyperlink_compat
+ ));
message.push_str(&format!("[FEATURES]: {:?}\n", FEATURES));
- message.push_str("[DOCUMENTATION]: zellij.dev/documentation/\n");
+ let mut hyperlink = String::new();
+ hyperlink.push_str(hyperlink_start);
+ hyperlink.push_str("https://www.zellij.dev/documentation/");
+ hyperlink.push_str(hyperlink_mid);
+ hyperlink.push_str("zellij.dev/documentation");
+ hyperlink.push_str(hyperlink_end);
+ message.push_str(&format!("[DOCUMENTATION]: {}", hyperlink));
+ //printf '\e]8;;http://example.com\e\\This is a link\e]8;;\e\\\n'
std::io::stdout().write_all(message.as_bytes())?;