mirror of
https://github.com/jarun/nnn.git
synced 2024-12-01 02:49:44 +00:00
preview-tui: wait killed previewers (#632)
This commit is contained in:
parent
7b606e0e29
commit
2acc7bd324
|
@ -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:]')"
|
||||
|
|
Loading…
Reference in a new issue