mirror of
https://github.com/jarun/nnn.git
synced 2024-11-24 11:51:27 +00:00
preview-tui: close previewer
This commit is contained in:
parent
f0c64a89b8
commit
15031f7d9e
|
@ -273,6 +273,15 @@ if [ "$PREVIEW_MODE" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
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
|
if [ "$TERMINAL" = "tmux" ]; then
|
||||||
# tmux splits are inverted
|
# tmux splits are inverted
|
||||||
if [ "$SPLIT" = "v" ]; then SPLIT="h"; else SPLIT="v"; fi
|
if [ "$SPLIT" = "v" ]; then SPLIT="h"; else SPLIT="v"; fi
|
||||||
|
|
|
@ -374,6 +374,15 @@ if [ "$PREVIEW_MODE" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
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
|
if [ "$TERMINAL" = "tmux" ]; then
|
||||||
# tmux splits are inverted
|
# tmux splits are inverted
|
||||||
if [ "$SPLIT" = "v" ]; then SPLIT="h"; else SPLIT="v"; fi
|
if [ "$SPLIT" = "v" ]; then SPLIT="h"; else SPLIT="v"; fi
|
||||||
|
|
Loading…
Reference in a new issue