Remove bug in grep pattern

The pid the `grep -v` is trying to eliminate is not at the end
of the line.

`all_tmux_processes` produces the following output (for example):

```
tmux                        32069 29270
```

Here the first number is the pid and the second -- the uid. So, since
the idea of `number_tmux_processes_except_current_server` is to eliminate
32069 from consideration, it should look for "<SPACE>PID<SPACE>".
pull/49/head
Sergei Gerasenko 2021-04-24 23:25:11 -05:00
parent ef62ce199a
commit a9785b4e2d
1 changed files with 1 additions and 1 deletions

View File

@ -34,7 +34,7 @@ all_tmux_processes() {
number_tmux_processes_except_current_server() {
all_tmux_processes |
\grep -v " $(current_tmux_server_pid)$" |
\grep -v " $(current_tmux_server_pid) " |
wc -l |
sed "s/ //g"
}