mirror of
https://github.com/tmux-plugins/tmux-resurrect.git
synced 2024-12-18 04:38:49 +00:00
23 lines
299 B
Bash
Executable File
23 lines
299 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
|
PANE_PID="$1"
|
|
|
|
exit_safely_if_empty_ppid() {
|
|
if [ -z "$PANE_PID" ]; then
|
|
exit 0
|
|
fi
|
|
}
|
|
|
|
full_command() {
|
|
\pgrep -lf -P "$PANE_PID" |
|
|
cut -d' ' -f2-
|
|
}
|
|
|
|
main() {
|
|
exit_safely_if_empty_ppid
|
|
full_command
|
|
}
|
|
main
|