Skip to content

Commit fc73e09

Browse files
author
Sergei Gerasenko
committed
Use the -u switch of ps to limit ps scope to that of the current user.
1 parent 351b801 commit fc73e09

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

scripts/helpers.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ all_tmux_processes() {
2727
# 1) `tmux source-file .tmux.conf` (used to reload tmux.conf)
2828
# 2) `tmux a` (which shows an additional process)
2929

30-
ps -Ao "command pid uid" |\
31-
grep $UID |\
30+
ps -u $UID -o "command pid uid" |\
3231
grep -E '^tmux' |\
3332
grep -vE '^tmux\s+(a|source)'
3433
}

0 commit comments

Comments
 (0)