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

Fish completion doesn't silence warnings #268

Open
niklasmohrin opened this issue Feb 13, 2022 · 1 comment
Open

Fish completion doesn't silence warnings #268

niklasmohrin opened this issue Feb 13, 2022 · 1 comment
Labels

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.

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

No branches or pull requests

3 participants