about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lepus.uberspace.de>2016-11-04 14:57:45 -0400
committerhut <hut@lepus.uberspace.de>2016-11-04 14:57:45 -0400
commita5d6fbd7354c2f02af5cb1e21f781cf9e2939946 (patch)
treecc2b5feaba91f74f2913c03250d7a4b149051dcb
parent922d60f605c20917c097ea07356abdadc1838bce (diff)
downloadranger-a5d6fbd7354c2f02af5cb1e21f781cf9e2939946.tar.gz
added comments to code from 9361c51 (#693)
-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" - && \