summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/config/rifle.conf4
-rwxr-xr-xranger/data/scope.sh4
2 files changed, 6 insertions, 2 deletions
diff --git a/ranger/config/rifle.conf b/ranger/config/rifle.conf
index aae60ea7..aadc2f2c 100644
--- a/ranger/config/rifle.conf
+++ b/ranger/config/rifle.conf
@@ -181,8 +181,10 @@ ext xcf,                    X, flag f = gimp -- "$@"
 #-------------------------------------------
 # Archives
 #-------------------------------------------
-# This requires atool
+
+# avoid password prompt by providing empty password
 ext 7z, has 7z = 7z -p l "$@" | "$PAGER"
+# This requires atool
 ext ace|ar|arc|bz2?|cab|cpio|cpt|deb|dgc|dmg|gz,  has als     = als -- "$@" | "$PAGER"
 ext iso|jar|msi|pkg|rar|shar|tar|tgz|xar|xpi|xz|zip, has als     = als -- "$@" | "$PAGER"
 ext 7z|ace|ar|arc|bz2?|cab|cpio|cpt|deb|dgc|dmg|gz,  has aunpack = aunpack -- "$@"
diff --git a/ranger/data/scope.sh b/ranger/data/scope.sh
index 8bccd12b..a0fb2ec0 100755
--- a/ranger/data/scope.sh
+++ b/ranger/data/scope.sh
@@ -72,9 +72,11 @@ case "$extension" in
         try bsdtar -lf "$path" && { dump | trim; exit 0; }
         exit 1;;
     rar)
+        # avoid password prompt by providing empty password
         try unrar -p- lt "$path" && { dump | trim; exit 0; } || exit 1;;
     7z)
-	try 7z -p l "$path" && { dump | trim; exit 0; } || exit 1;;
+        # avoid password prompt by providing empty password
+        try 7z -p l "$path" && { dump | trim; exit 0; } || exit 1;;
     # PDF documents:
     pdf)
         try pdftotext -l 10 -nopgbrk -q "$path" - && \