mirror of
https://github.com/tmux-plugins/tmux-resurrect.git
synced 2024-11-23 04:58:47 +00:00
ps.sh: fix ps arguments to work for busybox
Use the format specifier 'ppid,args' instead of 'ppid command'. POSIX allows either spaces or commas as separators, but busybox only allows commas. Furthermore, 'args' is recognized by POSIX[0] while 'command' is not. On implementations of ps that do recognize 'command', it is simply an alias for 'args', e.g. Debian[1] and FreeBSD[2]. [0]: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/ps.html [1]: https://manpages.debian.org/bullseye/procps/ps.1.en.html [2]: https://www.freebsd.org/cgi/man.cgi?query=ps
This commit is contained in:
parent
75458f91c8
commit
45aa8feef6
@ -11,7 +11,7 @@ exit_safely_if_empty_ppid() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
full_command() {
|
full_command() {
|
||||||
ps -ao "ppid command" |
|
ps -ao "ppid,args" |
|
||||||
sed "s/^ *//" |
|
sed "s/^ *//" |
|
||||||
grep "^${PANE_PID}" |
|
grep "^${PANE_PID}" |
|
||||||
cut -d' ' -f2-
|
cut -d' ' -f2-
|
||||||
|
Loading…
Reference in New Issue
Block a user