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

Short flag for --paging=never? #1075

Closed
LordFlashmeow opened this issue Jun 28, 2020 · 7 comments
Closed

Short flag for --paging=never? #1075

LordFlashmeow opened this issue Jun 28, 2020 · 7 comments
Labels
feature-request New feature or request

Comments

@LordFlashmeow
Copy link
Contributor

Sometimes, when I'm working with files larger than my screen, I find it more frustrating to with deal with less than use iTerm's scrollback, so I can come back to it later. less is great for looking at the first n lines of the file, but after that it's a pain.

The auto setting works fine for everything else, the only time I need to use the paging flag is for --paging=never, so it feels very long for an effectively "true/false" flag. Would it be possible to add a single letter alias for --paging=never? (Maybe -P?)

@LordFlashmeow LordFlashmeow added the feature-request New feature or request label Jun 28, 2020
@windwp
Copy link

windwp commented Jun 29, 2020

You can create a bash alias for it

@sharkdp
Copy link
Owner

sharkdp commented Jun 29, 2020

Thank you for your request.

Note that you can already use --plain/-p twice to disable paging (and reduce the style to "plain"):

bat -pp …

@LordFlashmeow
Copy link
Contributor Author

Hmm. True, but then a lot of the decorations are missing. It looks like it's only a couple of lines to add — one if statement in config(), and a couple of lines to add the argument. I can make a PR with my proposed changes, unless you think it's a bad idea (it's your project, after all!)

@sharkdp
Copy link
Owner

sharkdp commented Jun 30, 2020

Sounds good to me. @eth-p, what do you think?

@eth-p
Copy link
Collaborator

eth-p commented Jul 2, 2020

Short flags are at a bit of a premium, but this seems like a good reason to use one. 👍

@sharkdp
Copy link
Owner

sharkdp commented Jul 2, 2020

Closed via #1082

@sharkdp sharkdp closed this as completed Jul 2, 2020
@sharkdp
Copy link
Owner

sharkdp commented Oct 2, 2020

Released in v0.16.0.

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

4 participants