Skip to content

How does automatic pane naming work? Is it possible to adjust it? #2848

Answered by danvolchek
StigZord asked this question in Q&A
Discussion options

You must be logged in to vote

It seems to be based on terminal title. That can be set through:

echo -n -e "\033]0;TEXT\007"

Probably every time a command is run (so it updates on cwd changing, or other things). That can be done like this in your .zshrc for zsh:

precmd() {
    echo -n -e "\033]0;TEXT\007"
}

There's probably more idiomatic ways to set terminal title, but the above at least works for zsh. Unsure about other shells.

It took me forever to find this out through trying random things - it's undocumented. I found this post before I figured it out, and my reaction was literally https://xkcd.com/979/.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@nd-0r
Comment options

@adillari
Comment options

Answer selected by StigZord
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants