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

Quick way to disable line numbers #2059

Closed
dcbishop opened this issue Feb 3, 2022 · 5 comments
Closed

Quick way to disable line numbers #2059

dcbishop opened this issue Feb 3, 2022 · 5 comments
Labels
feature-request New feature or request

Comments

@dcbishop
Copy link

dcbishop commented Feb 3, 2022

I often use 'cat' to output text so I can copy and paste it from the console. But 'bat' adds line numbers by default.

I know it can be done via '--style=plain' but that's a bit much to type out for a quick cut and paste. Also the default could be changed but normally I want the line numbers. There is already a '-n' argument to enable line numbers.

It would be nice if there was a short arg to disable it. Perhaps -N (as the opposite to -n)?

@dcbishop dcbishop added the feature-request New feature or request label Feb 3, 2022
@sharkdp
Copy link
Owner

sharkdp commented Feb 3, 2022

Does -p (plain) work for you?

@sharkdp
Copy link
Owner

sharkdp commented Feb 3, 2022

You can also supply it twice, to disable the pager. This is what I usually do when I want to copy something (-pp).

@dcbishop
Copy link
Author

dcbishop commented Feb 5, 2022

That does what I need, thanks.

It does drop the rest of the formatting (header/borders) though but works for my use case.

@dcbishop dcbishop closed this as completed Feb 5, 2022
@why-not-try-calmer
Copy link

@sharkdp Can you hide / disable line numbers while reading a document? I don't always know before opening a document if I'll need to copy-paste from it.

@PhantomThreads
Copy link

Is there a way to reduce the line number margin size versus completely removing it?

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