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

Automatic cleaning up the output #2118

Closed
noraworld opened this issue Mar 11, 2022 · 3 comments
Closed

Automatic cleaning up the output #2118

noraworld opened this issue Mar 11, 2022 · 3 comments
Labels
question Further information is requested

Comments

@noraworld
Copy link

noraworld commented Mar 11, 2022

How can I clean up the bat output automatically after exiting?

I usually use the option --paging=always to always show with less style. less cleans up the output automatically after exiting, but bat doesn't.

Is there any available options to do this?

@noraworld noraworld added the question Further information is requested label Mar 11, 2022
@sharkdp
Copy link
Owner

sharkdp commented Mar 11, 2022

Is there any available options to do this?

No. You could add --paging=always to bats config file, and that should probably do what you want. But bat itself can not do this, as it simply prints do the terminal. It doesn't open an 'alternate screen' like a pager usually does.

Potentially related: #1053

@noraworld
Copy link
Author

Thank you for your reply.

I see bat can't do this right now. Is bat planned to have an ability to clean up the terminal after exiting in the future as well as less does?

@sharkdp
Copy link
Owner

sharkdp commented Mar 18, 2022

Is bat planned to have an ability to clean up the terminal after exiting in the future as well as less does?

no, but as mentioned above, you can follow #1053 if you are interested in updates on this.

@sharkdp sharkdp closed this as completed Mar 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants