denisidoro/navi

navi --tldr not working even with rust client tlrc

TwiggyWan opened this issue · 10 comments

hi
Describe the bug

navi --tldr says :

    
    Note:
    Please make sure you're using a version that supports the --markdown flag.
    If you are already using a supported version you can ignore this message. 
    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.

So I installed tlrc, expecting it to work. but it doesnt have a --markdown flag.

To Reproduce
Steps to reproduce the behavior:

brew install navi
brew install tlrc
navi --tldr docker

Expected behavior
According to the hint message navi --tldr should be supported but it is not. Please consider to change the hint text.

Versions:

  • OS: [e.g. macOS, WSL ubuntu, ubuntu] : debian bookworm, navi 2.23.0 & tlrc (v1.9.2 (implementing the tldr client specification v2.2)) installed through homebrew
  • Shell Version [replace this text with the output of sh --version]: GNU bash, version 5.2.15(1)-release (x86_64-pc-linux-gnu)

Additional context
thanks

Thanks for opening your first issue here! In case you're facing a bug, please update navi to the latest version first. Maybe the bug is already solved! :)

Same issue with v2.23.0

image

The rust client I tested years ago was tealdeer. I haven't tested tlrc yet.

The issue also occurs on my system with tealdeer (latest version, 1.6.1). I believe the reason is that navi attempts to pass the --markdown flag to the tldr client, and this flag is not supported. The working flag is --raw, as per the man page of tlrc. This issue is present even when the tealdeer option is set to true in the navi config, which as I understand is supposed to enforce use the --raw flag.

miyl commented

Regarding tealdeer it was supposedly fixed in #873, where the config option was added, however this commit was added in January this year, while the latest release of navi was December last year, so the fix isn't out yet, sadly.

Well, unless you build your version of navi from the master branch.

Hopefully a new version is soon released.

Hi, in that case i'm happy to consider this issue as resolved if the docs make it a bit clearer which tldr client to install, which is what I tried to do with pr #916 .

thanks

Regarding tealdeer it was supposedly fixed in #873, where the config option was added, however this commit was added in January this year

This is still the case 1 year since the fix and surprisingly confusing to debug. I recommend reopening the issue until the next release once package managers like Homebrew are updated.

Furthermore assuming tealdeer really is the recommended client shouldn't client.tealdeer also default to true? Or preferably client.format_flag to --raw (tlrc too) with a note about --markdown for the Node client 🧠

Hi

I recommend reopening the issue until the next release once package managers like Homebrew are updated.

I think this better warrants an issue on the homebrew side, as what package managers maintenance people do is not related in any way to the life cycle of the original software

I think this better warrants an issue on the homebrew side

There hasn't been any https://github.com/denisidoro/navi/releases in over 1 year for Homebrew to link. navi is neat but I switched back to https://github.com/isacikgoz/tldr for my use case.

Hi

I recommend reopening the issue until the next release once package managers like Homebrew are updated.

I think this better warrants an issue on the homebrew side, as what package managers maintenance people do is not related in any way to the life cycle of the original software

Hi, I have been trying to install navi and a tldr client alongside and make it work, I do not consider this issue fixed, as there is no clear path to install tldr in a working way even with the fix made on the doc : tealdeer is not the default behavior, while being the advised client in the master branch. the only setup that seems to work is the tldr client from npm, which is totally unclear from the doc and error messages.
On top of that, as mentioned earlier, the last release of navi does not even embed this fix, and only seems to work with the npm client, whatever configuration you choose.
I second the idea of leaving this open until a new release of navi clarifies the usage of tldr.