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

Default pager scrolls to the bottom #361

Open
tranzystorekk opened this issue Apr 11, 2024 · 3 comments
Open

Default pager scrolls to the bottom #361

tranzystorekk opened this issue Apr 11, 2024 · 3 comments

Comments

@tranzystorekk
Copy link
Contributor

tranzystorekk commented Apr 11, 2024

When setting use_pager=true, the less -R default displays short tldr pages scrolled to the bottom:

obraz

This can be fixed with PAGER="less -R +g":

obraz

I'm not sure if modifying the default command is worth it, but setting the global PAGER also seems like an overkill, maybe a TEALDEER_PAGER variable would be a good middle ground?

@niklasmohrin
Copy link
Collaborator

Would using an alias work? In bash, you can run alias tldr="PAGER='less -R +g' tldr" in your .bashrc file, which is where I suppose you would want to set the value of TEALDEER_PAGER, if we would support that. Then, all following usages of tldr will have the PAGER variable set.

@tranzystorekk
Copy link
Contributor Author

Alias is a viable workaround, but a proper TEALDEER_PAGER seems like a more user-forward way; similarly man has MANPAGER and bat has BAT_PAGER.

@niklasmohrin
Copy link
Collaborator

Fair enough. We are generally moving more towards config.toml over environment variables, so maybe an option there (next to use_pager) would be better

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

No branches or pull requests

2 participants