Merge pull request #877 from luukvbaal/preview-tui

cleanup fifo
This commit is contained in:
Mischievous Meerkat 2021-03-14 20:10:47 +05:30 committed by GitHub
commit 3c0c5951ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -209,7 +209,10 @@ ueberzug_refresh() {
preview_fifo &
wait
}
[ "$TERMINAL" != "kitty" ] && [ "$PREVIEW_MODE" ] && exists ueberzug && trap 'ueberzug_refresh' WINCH
if [ "$TERMINAL" != "kitty" ] && [ "$PREVIEW_MODE" ] && exists ueberzug; then
trap 'ueberzug_refresh' WINCH
trap 'rm "$FIFO_UEBERZUG"' INT HUP EXIT
fi
preview_fifo() {
# use cat instead of 'exec <' to avoid issues with dash shell

View File

@ -272,7 +272,10 @@ ueberzug_refresh() {
preview_fifo &
wait
}
[ "$TERMINAL" != "kitty" ] && [ "$PREVIEW_MODE" ] && exists ueberzug && trap 'ueberzug_refresh' WINCH
if [ "$TERMINAL" != "kitty" ] && [ "$PREVIEW_MODE" ] && exists ueberzug; then
trap 'ueberzug_refresh' WINCH
trap 'rm "$FIFO_UEBERZUG"' INT HUP EXIT
fi
preview_fifo() {
# use cat instead of 'exec <' to avoid issues with dash shell