summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorvaloq <valoq@mailbox.org>2016-10-23 20:46:59 +0200
committervaloq <valoq@mailbox.org>2016-10-23 20:46:59 +0200
commit9361c51b54efad452297b131522aedf1808f39b7 (patch)
tree5823f7b12d76f24593709f70640023b7832dcb02 /ranger
parent041856327c0d9b1fe3f26c5447995fda477c657f (diff)
downloadranger-9361c51b54efad452297b131522aedf1808f39b7.tar.gz
fixed 7z crash
Diffstat (limited to 'ranger')
-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" - && \