Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The --quiet flag doesn't silence all warnings #268

Open
niklasmohrin opened this issue Feb 13, 2022 · 3 comments
Open

The --quiet flag doesn't silence all warnings #268

niklasmohrin opened this issue Feb 13, 2022 · 3 comments
Labels
Milestone

Comments

@niklasmohrin
Copy link
Collaborator

In fish, when typing tldr t<Tab>, I get additional output printed to stderr:

tldr tThe cache hasn't been updated for 34 days.
You should probably run `tldr --update` soon.

tabula          textql            tlmgr-update         trap
tac             theharvester      tlp                  trash
tail            thunar            tlp-stat             trash-cli
tailscale       thunderbird       tmpmail              travis

This is because we use a plain tldr --list for the completion. The zsh script avoids this by redirecting 2>/dev/null, the bash one either has the same problem or bash completions automatically silence this, I haven't checked. I suppose 2>/dev/null is okay, but I would expect --quiet to suffice for this and prefer using that instead.

@newsch
Copy link
Contributor

newsch commented Jun 17, 2022

I can confirm this is a problem with the bash completion as well:

$ source completion/bash_tealdeer
$ touch -d '31 days ago' ~/.cache/tealdeer/tldr-pages
$ tldr tThe cache hasn't been updated for 31 days.
You should probably run `tldr --update` soon.

FWIW, -q doesn't suppress the "Cache not found. Please run tldr --update." message.

@Walker-00
Copy link
Contributor

Is this been fixed?, both "fish" and "bash" works fine for me. Shouldn't this close?

@niklasmohrin niklasmohrin changed the title Fish completion doesn't silence warnings The --quiet flag doesn't silence all warnings Jan 31, 2025
@niklasmohrin
Copy link
Collaborator Author

Completion seems to work for some other reason, but the original point that tldr --quiet should not display warnings or errors still stands

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

4 participants