summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lepus.uberspace.de>2017-04-23 21:42:10 +0200
committerhut <hut@lepus.uberspace.de>2017-04-23 21:43:17 +0200
commitccbcfc60810cba1ef79677a714746d40b34e34e7 (patch)
tree42341be07dd4b368378dd52482492628a7bd8c38
parent20f0f2ba96a4a9dcbb8beffbee957b42157d4efd (diff)
downloadranger-ccbcfc60810cba1ef79677a714746d40b34e34e7.tar.gz
config/rifle.conf: list/extract archives without atool
-rw-r--r--ranger/config/rifle.conf13
1 files 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