From 9361c51b54efad452297b131522aedf1808f39b7 Mon Sep 17 00:00:00 2001 From: valoq Date: Sun, 23 Oct 2016 20:46:59 +0200 Subject: fixed 7z crash --- ranger/config/rifle.conf | 3 ++- ranger/data/scope.sh | 4 +++- 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" - && \ -- cgit 1.4.1-2-gfad0