]> Sergey Matveev's repositories - nnn.git/commitdiff
Fix preview-tui without -a
authorLuuk van Baal <luukvbaal@gmail.com>
Sat, 23 Oct 2021 13:50:29 +0000 (15:50 +0200)
committerLuuk van Baal <luukvbaal@gmail.com>
Sat, 23 Oct 2021 13:50:29 +0000 (15:50 +0200)
plugins/preview-tui

index c634cf00a7a3991d3c3c4527d5bad4fe466505ed..0f5d60edc0a4eccae2e790ba7e7bc225a178592b 100755 (executable)
@@ -86,6 +86,7 @@ NNN_PREVIEWDIR="${NNN_PREVIEWDIR:-$TMPDIR/nnn/previews}"
 NNN_PREVIEWWIDTH="${NNN_PREVIEWWIDTH:-1920}"
 NNN_PREVIEWHEIGHT="${NNN_PREVIEWHEIGHT:-1080}"
 NNN_PARENT="${NNN_FIFO#*.}"
+[ "$NNN_PARENT" -eq "$NNN_PARENT" ] 2>/dev/null || NNN_PARENT=""
 FIFOPID="$TMPDIR/nnn-preview-tui-fifopid.$NNN_PARENT"
 PREVIEWPID="$TMPDIR/nnn-preview-tui-pagerpid.$NNN_PARENT"
 CURSEL="$TMPDIR/nnn-preview-tui-selection.$NNN_PARENT"