summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/config/rifle.conf3
-rwxr-xr-xranger/data/scope.sh4
2 files changed, 5 insertions, 2 deletions
diff --git a/ranger/config/rifle.conf b/ranger/config/rifle.conf
index d6165f21..aae60ea7 100644
--- a/ranger/config/rifle.conf
+++ b/ranger/config/rifle.conf
@@ -182,7 +182,8 @@ ext xcf,                    X, flag f = gimp -- "$@"
 # Archives
 #-------------------------------------------
 # This requires atool
-ext 7z|ace|ar|arc|bz2?|cab|cpio|cpt|deb|dgc|dmg|gz,  has als     = als -- "$@" | "$PAGER"
+ext 7z, has 7z = 7z -p l "$@" | "$PAGER"
+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 -- "$@"
 ext iso|jar|msi|pkg|rar|shar|tar|tgz|xar|xpi|xz|zip, has aunpack = aunpack -- "$@"
diff --git a/ranger/data/scope.sh b/ranger/data/scope.sh
index 44fcec2b..8bccd12b 100755
--- a/ranger/data/scope.sh
+++ b/ranger/data/scope.sh
@@ -65,7 +65,7 @@ fi
 
 case "$extension" in
     # Archive extensions:
-    7z|a|ace|alz|arc|arj|bz|bz2|cab|cpio|deb|gz|jar|lha|lz|lzh|lzma|lzo|\
+    a|ace|alz|arc|arj|bz|bz2|cab|cpio|deb|gz|jar|lha|lz|lzh|lzma|lzo|\
     rpm|rz|t7z|tar|tbz|tbz2|tgz|tlz|txz|tZ|tzo|war|xpi|xz|Z|zip)
         try als "$path" && { dump | trim; exit 0; }
         try acat "$path" && { dump | trim; exit 3; }
@@ -73,6 +73,8 @@ case "$extension" in
         exit 1;;
     rar)
         try unrar -p- lt "$path" && { dump | trim; exit 0; } || exit 1;;
+    7z)
+	try 7z -p l "$path" && { dump | trim; exit 0; } || exit 1;;
     # PDF documents:
     pdf)
         try pdftotext -l 10 -nopgbrk -q "$path" - && \