From 2acc7bd3246674c8f1cc039e36d1afb5b4287824 Mon Sep 17 00:00:00 2001 From: lvgx Date: Thu, 4 Jun 2020 04:53:04 +0200 Subject: [PATCH] preview-tui: wait killed previewers (#632) --- plugins/preview-tui | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/preview-tui b/plugins/preview-tui index bd9fbd8f..62ba94c8 100755 --- a/plugins/preview-tui +++ b/plugins/preview-tui @@ -52,7 +52,7 @@ fifo_pager() { } preview_file () { - kill %- %+ 2>/dev/null + kill %- %+ 2>/dev/null && wait %- %+ 2>/dev/null clear encoding="$(file -Lb --mime-encoding -- "$1")" @@ -60,7 +60,7 @@ preview_file () { # Detect mime type mimetype="$(file -Lb --mime-type -- "$1")" - # Detect file extention - use if you need + # Detect file extention ext="${1##*.}" if [ -n "$ext" ]; then ext="$(printf "%s" "${ext}" | tr '[:upper:]' '[:lower:]')"