nnn

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 59dfffd0045744fc28ae5bf748d5c5ba8127fed1
parent f0c64a89b8c12ef569ea7be7e0be16da0b4fe4cb
Author: PiƱa Colada <engineerarun@gmail.com>
Date:   Fri, 23 Apr 2021 03:51:16 +0530

Merge pull request #961 from luukvbaal/preview-tui

preview-tui: close previewer
Diffstat:
Mplugins/preview-tui | 9+++++++++
Mplugins/preview-tui-ext | 9+++++++++
2 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/plugins/preview-tui b/plugins/preview-tui @@ -273,6 +273,15 @@ if [ "$PREVIEW_MODE" ]; then exit 0 fi +if pgrep -f "cat $NNN_FIFO" >/dev/null; then + if exists QuickLook.exe && stat "$1" >/dev/null 2>&1; then + f="$(wslpath -w "$1" 2>&1)" && QuickLook.exe "$f" & + elif exists Bridge.exe && stat "$1" >/dev/null 2>&1; then + f="$(wslpath -w "$1" 2>&1)" && Bridge.exe "$f" & + fi + pkill -f "cat $NNN_FIO" + exit 0 +fi if [ "$TERMINAL" = "tmux" ]; then # tmux splits are inverted if [ "$SPLIT" = "v" ]; then SPLIT="h"; else SPLIT="v"; fi diff --git a/plugins/preview-tui-ext b/plugins/preview-tui-ext @@ -374,6 +374,15 @@ if [ "$PREVIEW_MODE" ]; then exit 0 fi +if pgrep -f "cat $NNN_FIFO" >/dev/null; then + if exists QuickLook.exe && stat "$1" >/dev/null 2>&1; then + f="$(wslpath -w "$1" 2>&1)" && QuickLook.exe "$f" & + elif exists Bridge.exe && stat "$1" >/dev/null 2>&1; then + f="$(wslpath -w "$1" 2>&1)" && Bridge.exe "$f" & + fi + pkill -f "cat $NNN_FIO" + exit 0 +fi if [ "$TERMINAL" = "tmux" ]; then # tmux splits are inverted if [ "$SPLIT" = "v" ]; then SPLIT="h"; else SPLIT="v"; fi