From ccbcfc60810cba1ef79677a714746d40b34e34e7 Mon Sep 17 00:00:00 2001 From: hut Date: Sun, 23 Apr 2017 21:42:10 +0200 Subject: config/rifle.conf: list/extract archives without atool --- ranger/config/rifle.conf | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/ranger/config/rifle.conf b/ranger/config/rifle.conf index 5e38465a..39dee7e9 100644 --- a/ranger/config/rifle.conf +++ b/ranger/config/rifle.conf @@ -190,9 +190,16 @@ ext iso|jar|msi|pkg|rar|shar|tar|tgz|xar|xpi|xz|zip, has atool = atool --list -- ext 7z|ace|ar|arc|bz2?|cab|cpio|cpt|deb|dgc|dmg|gz, has atool = atool --extract --each -- "$@" ext iso|jar|msi|pkg|rar|shar|tar|tgz|xar|xpi|xz|zip, has atool = atool --extract --each -- "$@" -# Fallback: -ext tar|gz, has tar = tar vvtf "$@" | "$PAGER" -ext tar|gz, has tar = tar vvxf "$@" +# Listing and extracting archives without atool: +ext tar|gz|bz2|xz, has tar = tar vvtf "$1" | "$PAGER" +ext tar|gz|bz2|xz, has tar = for file in "$@"; do tar vvxf "$file"; done +ext bz2, has bzip2 = for file in "$@"; do bzip2 -dk "$file"; done +ext zip, has unzip = unzip -l "$1" | less +ext zip, has unzip = for file in "$@"; do unzip -d "${file%.*}" "$file"; done +ext ace, has unace = unace l "$1" | less +ext ace, has unace = for file in "$@"; do unace e "$file"; done +ext rar, has unrar = unrar l "$1" | less +ext rar, has unrar = for file in "$@"; do unrar x "$file"; done #------------------------------------------- # Misc -- cgit 1.4.1-2-gfad0