-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
providing non-interactive mode #539
Comments
Yes, that is the intended behavior. Interactive mode means: the output goes to an interactive terminal. That is usually the case if the output is not piped anywhere else. If you want the plain file contents, use |
Thanks @sharkdp, but.. what I've tried to find is a way or an option to just print the whole file content non-interactively with styles and decorations such as line numbers, filename, and colors, which is not achieved by On my computer (zsh v5.7.1, kali-rolling (debian stretch)), If I pipe the output, then the file contents is just printed non-interatively. However, decorations and style are not preserved, which is not what I want. Is there a way? If it's not just implemented, do you think it can be good to be? (for me, I feel definitely "yes") |
Take a look at the |
Thanks you @sharkdp! bat --decorations always --color always <file> | cat P.S. But if there's an option for it, wouldn't it be convenient? For example, typing that long command might happen more frequent than expected in certain condition. It could be little cumbersome if not using an alias. |
@jjangga0214 @sharkdp if I understand it correctly, the better command would be:
This still includes coloring and decoration by default -- it just doesn't use the pager anymore. |
Maybe some documentation is worth adding though. E.g. something with the word "interactive mode". I was staring at |
I've also raised an issue now for supporting the non-interactive mode on a global level a bit better: #2629 |
Hi,
bat
enters interactive mode though I didn't pipeline it toless
.I wonder if it's intended and there's an option or workaround to just print the content.
Thanks.
The text was updated successfully, but these errors were encountered: