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

Documentation missing for pager mode? #2355

Closed
artfulrobot opened this issue Oct 5, 2022 · 4 comments
Closed

Documentation missing for pager mode? #2355

artfulrobot opened this issue Oct 5, 2022 · 4 comments
Labels
feature-request New feature or request

Comments

@artfulrobot
Copy link

First: cool project, thanks for sharing!

I can't find any documentation on what keys do in an interactive session, i.e. using it as a pager.

I've figured that / does search, and that generally it's like less. But some docs would be helpful.

e.g. I'd love to be able to toggle line wrapping - I'm not sure if that's a missing feature or an undocumented feature.

@artfulrobot artfulrobot added the feature-request New feature or request label Oct 5, 2022
@Saucistophe
Copy link

Saucistophe commented Oct 6, 2022

Actually, bat uses less itself.
This is mentionned here

Edit: However, using less, you can switch the word wrap by typing - then S; this does not work in bat.

@keith-hall
Copy link
Collaborator

Indeed, if you wanted other features, bat would need to use a builtin pager: #1053

However, using less, you can switch the word wrap by typing - then S; this does not work in bat.

presumably bat has already wrapped it by the time it gets to less, and passing --wrap never to bat could re-enable that functionality in less, but would mess up the decorations like line numbers / grid etc.

@artfulrobot
Copy link
Author

Ha! I did not realise that bat uses less.

I like bat's wrapping with the indentation and line numbers but I can see how if it delegates paging for content that is basically already paged (set column width) then it's only ever going to be a mess.

I'll close this.

@Saucistophe
Copy link

I guess you could set MANPAGER to pass the -S option to less...?

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

No branches or pull requests

3 participants