Skip to content

Set file name as terminal title #2783

@Talinx

Description

@Talinx

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions