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
This commit is contained in:
parent
e1dab60d4f
commit
a2a0299ea5
1 changed files with 24 additions and 2 deletions
|
|
@ -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())?;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue