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

Set file name as terminal title #2783

Open
Talinx opened this issue Nov 24, 2023 · 1 comment
Open

Set file name as terminal title #2783

Talinx opened this issue Nov 24, 2023 · 1 comment
Labels
feature-request New feature or request

Comments

@Talinx
Copy link

Talinx commented Nov 24, 2023

Currently bat does not change the terminal title. Showing the file name in the terminal can be useful for navigating between terminal tabs.

For example, the following script sets the terminal title to the file name before displaying it with bat:

#!/bin/bash
echo -ne "\033]0;$1\007"
bat $1

The actual implementation inside bat should be more sophisticated by setting the title appropriately when viewing multiple files, resetting the title on exit etc.

@Talinx Talinx added the feature-request New feature or request label Nov 24, 2023
@Oliver-Looney
Copy link
Contributor

I'd like this feature as well, I'm going to look at adding it over the next few days!

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

2 participants