Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.