Skip to content

Commit

Permalink
Merge pull request #916 from TwiggyWan/fix/navi_tldr_hint
Browse files Browse the repository at this point in the history
chore(tldr): Make it more obvious that tealdeer is the recommended cl…
  • Loading branch information
denisidoro authored Sep 29, 2024
2 parents e0943c3 + c59af65 commit 8e23174
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/clients/tldr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ lazy_static! {
pub static ref NON_VAR_CHARS_REGEX: Regex = Regex::new(r"[^\da-zA-Z_]").expect("Invalid regex");
}

static VERSION_DISCLAIMER: &str = "The tldr client written in C (the default one in Homebrew) doesn't support markdown files, so navi can't use it.
The client written in Rust is recommended. The one available in npm works, too.";
static VERSION_DISCLAIMER: &str = "tldr-c-client (the default one in Homebrew) doesn't support markdown files, so navi can't use it.
The recommended client is tealdeer(https://github.com/dbrgn/tealdeer).";

fn convert_tldr_vars(line: &str) -> String {
let caps = VAR_TLDR_REGEX.find_iter(line);
Expand Down Expand Up @@ -69,7 +69,6 @@ pub fn call(query: &str) -> Result<Vec<String>> {
let msg = format!(
"navi was unable to call tldr.
Make sure tldr is correctly installed.
Refer to https://github.com/tldr-pages/tldr for more info.
Note:
{VERSION_DISCLAIMER}
Expand Down Expand Up @@ -100,7 +99,7 @@ Error:
Note:
The client.tealdeer config option can be set to enable tealdeer support.
Please make sure you're using a version that supports the --markdown flag.
If you want to use another client, please make sure it supports the --markdown flag.
If you are already using a supported version you can ignore this message.
{}
",
Expand Down

0 comments on commit 8e23174

Please sign in to comment.