Remove dependency on `pgrep`; use `ps` to get process names

Fixes #43
pull/54/head
Bruno Sutic 2014-09-20 22:33:14 +02:00
parent 618769b62f
commit 1d09f07d2b
No known key found for this signature in database
GPG Key ID: 66D96E4F2F7EF26C
3 changed files with 5 additions and 3 deletions

View File

@ -1,6 +1,7 @@
# Changelog
### master
- remove dependency on `pgrep` command. Use `ps` for fetching process names.
### v1.2.1, 2014-09-02
- tweak 'new_pane' creation strategy to fix #36

View File

@ -47,7 +47,7 @@ This plugin goes to great lengths to save and restore all the details from your
- restoring vim sessions (optional). More details in
[restoring vim sessions](#restoring-vim-sessions).
Requirements / dependencies: `tmux 1.9` or higher, `pgrep`, `bash`.
Requirements / dependencies: `tmux 1.9` or higher, `bash`.
`tmux-resurrect` is idempotent! It will not try to restore panes or windows that
already exist.

View File

@ -66,8 +66,9 @@ dump_panes_raw() {
}
pane_full_command() {
pane_pid="$1"
\pgrep -lf -P "$pane_pid" |
local pane_pid="$1"
ps -eo "ppid command" |
grep "^${pane_pid}" |
cut -d' ' -f2-
}