Rename default strategy to ps

This commit is contained in:
Bruno Sutic
2014-09-21 15:12:35 +02:00
parent 8ebda79f68
commit 1b79eb2f63
4 changed files with 4 additions and 2 deletions

24
save_command_strategies/ps.sh Executable file
View File

@ -0,0 +1,24 @@
#!/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() {
ps -eo "ppid command" |
sed "s/^ *//" |
grep "^${PANE_PID}" |
cut -d' ' -f2-
}
main() {
exit_safely_if_empty_ppid
full_command
}
main