summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorptzz <ptzzptzzp@gmail.com>2015-09-12 10:12:56 +0200
committerptzz <ptzzptzzp@gmail.com>2015-09-12 10:12:56 +0200
commit834323ed118d915f083deef2618a9afad6a6d595 (patch)
tree1f679860997ff103ddc07ae6941268353f8897a3 /ranger
parent6228b15906aa4ed253d6c52db565bfa10321a233 (diff)
downloadranger-834323ed118d915f083deef2618a9afad6a6d595.tar.gz
Get rid of garbage `-E` character in preview display on mac
* OSX does not support -E with /bin/echo

* On Linux the -E option is set by default

Fixes #344
Diffstat (limited to 'ranger')
-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 ce9ee574..3611c961 100755
--- a/ranger/data/scope.sh
+++ b/ranger/data/scope.sh
@@ -28,7 +28,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=$(/bin/echo -E "${path##*.}" | tr "[:upper:]" "[:lower:]")
+extension=$(/bin/echo "${path##*.}" | tr "[:upper:]" "[:lower:]")
 
 # Functions:
 # runs a command and saves its output into $output.  Useful if you need
@@ -36,7 +36,7 @@ extension=$(/bin/echo -E "${path##*.}" | tr "[:upper:]" "[:lower:]")
 try() { output=$(eval '"$@"'); }
 
 # writes the output of the previously used "try" command
-dump() { /bin/echo -E "$output"; }
+dump() { /bin/echo "$output"; }
 
 # a common post-processing function used after most commands
 trim() { head -n "$maxln"; }