Bugfix: do not count tmux source-file as tmux process

Do not count `tmux source-file .tmux.conf` as a tmux process when checking if
other tmux server is running.

Previously, this caused interpolation command not to be inserted into
`status-right` because `tmux source-file` was falsely detected as another tmux
server.
This commit is contained in:
Bruno Sutic
2015-03-14 15:55:00 +01:00
parent f821d353ea
commit d6ac017d1d
2 changed files with 7 additions and 1 deletions

View File

@ -23,8 +23,10 @@ current_tmux_server_pid() {
}
all_tmux_processes() {
# ignores `tmux source-file .tmux.conf` command used to reload tmux.conf
ps -Ao "command pid" |
\grep "^tmux"
\grep "^tmux" |
\grep -v "^tmux source"
}
number_tmux_processes_except_current_server() {