mirror of
https://github.com/tmux-plugins/tmux-continuum.git
synced 2024-11-21 10:38:49 +00:00
Fix for multiple users on the same machine
The issue and fix are described in https://github.com/tmux-plugins/tmux-continuum/issues/16 . Without this change, tmux-continuum works only for one tmux server on the machine. In a multi-user environment (e.g. a shared server), when multiple users are running their own tmux servers, this means that tmux-continuum works only for one of the users. This change enables tmux-continuum for one tmux server per user instead of one tmux server per machine.
This commit is contained in:
parent
7f99beee1d
commit
1531b3770a
@ -3,6 +3,7 @@
|
|||||||
### master
|
### master
|
||||||
- bugfix: "auto restore" feature stopped working
|
- bugfix: "auto restore" feature stopped working
|
||||||
- bugfix: prevent race condition when auto-saving with locks (@v9v)
|
- bugfix: prevent race condition when auto-saving with locks (@v9v)
|
||||||
|
- Multiple users on a system can now each run continuum on their own.
|
||||||
|
|
||||||
### v3.1.0, 2015-03-14
|
### v3.1.0, 2015-03-14
|
||||||
- properly quote scripts
|
- properly quote scripts
|
||||||
|
@ -24,7 +24,8 @@ current_tmux_server_pid() {
|
|||||||
|
|
||||||
all_tmux_processes() {
|
all_tmux_processes() {
|
||||||
# ignores `tmux source-file .tmux.conf` command used to reload tmux.conf
|
# ignores `tmux source-file .tmux.conf` command used to reload tmux.conf
|
||||||
ps -Ao "command pid" |
|
local user_id=$(id -u)
|
||||||
|
ps -u $user_id -o "command pid" |
|
||||||
\grep "^tmux" |
|
\grep "^tmux" |
|
||||||
\grep -v "^tmux source"
|
\grep -v "^tmux source"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user