Browse Source

fixed shellcheck errors for plugins/preview-tui

master
Lucas Summers 4 years ago
parent
commit
8a12c01da4
1 changed files with 5 additions and 7 deletions
  1. +5
    -7
      plugins/preview-tui

+ 5
- 7
plugins/preview-tui View File

@@ -172,7 +172,7 @@ preview_file () {
elif exists viu; then elif exists viu; then
viu -t "$1" viu -t "$1"
elif exists ueberzug; then elif exists ueberzug; then
preview_ueberzug "$1" preview_ueberzug "$cols" "$lines" "$1"
else else
fifo_pager print_bin_info "$1" fifo_pager print_bin_info "$1"
fi fi
@@ -196,12 +196,10 @@ preview_file () {
} }


preview_ueberzug() { preview_ueberzug() {
height=$(tput lines) {
width=$(tput cols) printf '{"action": "add", "identifier": "nnn_ueberzug", "x": 0, "y": 0, "width": "%s", "height": "%s", "path": "%s"}\n' "$1" "$2" "$3"
ueberzug layer --parser json 0< <( read -r
printf '{"action": "add", "identifier": "nnn_ueberzug", "x": 0, "y": 0, "max_width": "%s", "max_height": "%s", "path": "%s"}\n' "$width" "$height" "$1" } | ueberzug layer --parser json
read
)
} }


if [ "$PREVIEW_MODE" ] ; then if [ "$PREVIEW_MODE" ] ; then


||||||
x
 
000:0
Loading…
Cancel
Save