summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2011-08-10 12:52:17 +0200
committerhut <hut@lavabit.com>2011-08-10 12:52:17 +0200
commite77a5e28385f8b191c4331962662c025b422a797 (patch)
treeb6ded331a140642351d9eafe05c2ccdbdbc73e75
parentd65d3a6da55438a0b2c619d1218f8af50a0468aa (diff)
parentd0d194d886561622f4b5784ec0b23b8450fa8c2f (diff)
downloadranger-e77a5e28385f8b191c4331962662c025b422a797.tar.gz
Merge branch 'atool' of https://github.com/radhermit/ranger
-rwxr-xr-xranger/data/scope.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/ranger/data/scope.sh b/ranger/data/scope.sh
index 9f212cae..ca1f7e67 100755
--- a/ranger/data/scope.sh
+++ b/ranger/data/scope.sh
@@ -30,14 +30,15 @@ extension=$(echo "$path" | grep '\.' | grep -o '[^.]\+$')
 # Functions:
 # "have $1" succeeds if $1 is an existing command/installed program
 function have { type -P "$1" > /dev/null; }
-# "sucess" returns the exit code of the first program in the last pipe chain
+# "success" returns the exit code of the first program in the last pipe chain
 function success { test ${PIPESTATUS[0]} = 0; }
 
 case "$extension" in
 	# Archive extensions:
 	7z|a|ace|alz|arc|arj|bz|bz2|cab|cpio|deb|gz|jar|lha|lz|lzh|lzma|lzo|\
 	rar|rpm|rz|t7z|tar|tbz|tbz2|tgz|tlz|txz|tZ|tzo|war|xpi|xz|Z|zip)
-		atool -l "$path" | head -n $maxln && exit 3
+		als "$path" | head -n $maxln
+		success && exit 0 || acat "$path" | head -n $maxln && exit 3
 		exit 1;;
 	# PDF documents:
 	pdf)