]> Sergey Matveev's repositories - nnn.git/commitdiff
preview-tui-ext: use atool for rpm/deb
authorRoland Kammerer <roland.kammerer@linbit.com>
Wed, 21 Apr 2021 09:41:58 +0000 (11:41 +0200)
committerRoland Kammerer <roland.kammerer@linbit.com>
Wed, 21 Apr 2021 09:41:58 +0000 (11:41 +0200)
atool does good job in previewing the content of deb/rpm files, use it.

plugins/preview-tui-ext

index a1f64b22d8d84831ec84ba5916547274bb6c71a3..94542905433ac5a7a6b4744f2bee2db4d0634dba 100755 (executable)
@@ -210,6 +210,8 @@ preview_file() {
             fifo_pager unzip -l "$1"
         elif [ "$ext" = "gz" ] || [ "$ext" = "bz2" ]; then
             fifo_pager tar -tvf "$1"
+        elif [ "$mimetype" = "application/x-rpm" ] || [ "$mimetype" = "application/vnd.debian.binary-package" ] && exists atool; then
+            fifo_pager atool -l "$1"
         else
             fifo_pager print_bin_info "$1"
         fi