bat
bat copied to clipboard
Set file name as terminal title
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.
I'd like this feature as well, I'm going to look at adding it over the next few days!