summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lepus.uberspace.de>2013-11-04 21:34:20 +0100
committerhut <hut@lepus.uberspace.de>2013-11-04 21:34:20 +0100
commitd194334e1653c352c734299f50abeee9a77dca24 (patch)
tree4696e751cc0a3c5318f7db988e5b754ddb7b15c0
parent093c8b1a7b7656c82923539a4286606fd7ded4b5 (diff)
downloadranger-d194334e1653c352c734299f50abeee9a77dca24.tar.gz
data/scope.sh: don't evaluate special chars with echo
-rwxr-xr-xranger/data/scope.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/ranger/data/scope.sh b/ranger/data/scope.sh
index 76481f94..9f7aaf1c 100755
--- a/ranger/data/scope.sh
+++ b/ranger/data/scope.sh
@@ -26,7 +26,7 @@ maxln=200    # Stop after $maxln lines.  Can be used like ls | head -n $maxln
 
 # Find out something about the file:
 mimetype=$(file --mime-type -Lb "$path")
-extension=$(echo "${path##*.}" | tr "[:upper:]" "[:lower:]")
+extension=$(/bin/echo -E "${path##*.}" | tr "[:upper:]" "[:lower:]")
 
 # Functions:
 # runs a command and saves its output into $output.  Useful if you need
@@ -34,7 +34,7 @@ extension=$(echo "${path##*.}" | tr "[:upper:]" "[:lower:]")
 try() { output=$(eval '"$@"'); }
 
 # writes the output of the previously used "try" command
-dump() { echo "$output"; }
+dump() { /bin/echo -E "$output"; }
 
 # a common post-processing function used after most commands
 trim() { head -n "$maxln"; }