mirror of
https://github.com/jarun/nnn.git
synced 2025-01-15 21:36:42 +00:00
Merge pull request #1456 from luukvbaal/preview-tui
Preview-tui fix image_preview stdout
This commit is contained in:
commit
ad62463b48
|
@ -379,7 +379,6 @@ generate_preview() {
|
||||||
printf "%s" "$!" > "$PREVIEWPID"
|
printf "%s" "$!" > "$PREVIEWPID"
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
exec >/dev/tty
|
|
||||||
image_preview "$1" "$2" "$3"
|
image_preview "$1" "$2" "$3"
|
||||||
return
|
return
|
||||||
fi ;;
|
fi ;;
|
||||||
|
@ -405,6 +404,7 @@ generate_preview() {
|
||||||
|
|
||||||
image_preview() {
|
image_preview() {
|
||||||
clear
|
clear
|
||||||
|
exec >/dev/tty
|
||||||
if [ "$TERMINAL" = "kitty" ]; then
|
if [ "$TERMINAL" = "kitty" ]; then
|
||||||
# Kitty terminal users can use the native image preview method
|
# Kitty terminal users can use the native image preview method
|
||||||
kitty +kitten icat --silent --scale-up --place "$1"x"$2"@0x0 --transfer-mode=stream --stdin=no "$3" &
|
kitty +kitten icat --silent --scale-up --place "$1"x"$2"@0x0 --transfer-mode=stream --stdin=no "$3" &
|
||||||
|
|
Loading…
Reference in a new issue