Merge pull request #1053 from luukvbaal/preview-tui

Suppress pgrep output
This commit is contained in:
Piña Colada 2021-06-04 21:24:27 +05:30 committed by GitHub
commit 4637a5a84d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -380,7 +380,7 @@ winch_handler() {
tail --follow "$FIFO_UEBERZUG" | ueberzug layer --silent --parser json &
fi
preview_file "$(cat "$CURSEL")"
if ! kill -0 "$NNN_PARENT" || ! pgrep nnn; then
if ! kill -0 "$NNN_PARENT" || ! pgrep nnn >/dev/null; then
pkill -P "$$"
fi
} 2>/dev/null