Update preview-tui

make NNN_PREVIEWIMGPROG flexible enough to accept any program. programs like `timg` would also work (my preference), but it seems odd to add every single program out there when it's easy to add new ones by just this one variable
This commit is contained in:
Daniel Bretoi 2024-09-12 22:15:18 -07:00 committed by GitHub
parent 251843fe65
commit d85c23c433
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -460,6 +460,8 @@ image_preview() {
chafa "$3" &
elif exists img2sixel && [[ "$NNN_PREVIEWIMGPROG" == +(|img2sixel) ]]; then
img2sixel -g "$3" &
elif exists "$NNN_PREVIEWIMGPROG"; then
"$NNN_PREVIEWIMGPROG" "$3" &
else
fifo_pager print_bin_info "$3" && return
fi