Take the 2-minute tour ×

How can I make tmux to set pane_title automatically to currently running command?

Actually the setting automatic-rename is just what I want for pane_title, but for it's only for window_name.

share|improve this question
add comment

1 Answer

This is very similar to a question answered on StackOverflow. Since you want the current command, rather than the last command, the easiest thing to do is use a wrapper function to update the pane title.

panewrap () { printf "\033]2;%s\033\\" "$1"; "$@"; }

By prefixing all your commands with calls to panewrap, your tmux status bar will be updated before each command is run.

share|improve this answer
This is almost what I want. This the last executed command. I need the currently running command. For example when I execute python repl. –  Epeli May 13 '12 at 19:37
See updated answer. –  CodeGnome May 14 '12 at 12:43
add comment

Your Answer


