diff options
author | Pierre Neidhardt <ambrevar@gmail.com> | 2015-10-08 14:56:06 +0200 |
---|---|---|
committer | Pierre Neidhardt <ambrevar@gmail.com> | 2015-10-08 14:56:06 +0200 |
commit | 607d3569612a0dd518ab2e410bd17d2b296fe027 (patch) | |
tree | 836f8f3784fe17c7ceb87d88290cfe88f42dda83 /ranger | |
parent | f8341333ad3ab127dd9bf215769d77ab828efb0e (diff) | |
download | ranger-607d3569612a0dd518ab2e410bd17d2b296fe027.tar.gz |
scope.sh: Support unicode extensions
Most (all?) `tr` implementations do not support unicode. Use `awk` instead for turning extensions to lowercase.
Diffstat (limited to 'ranger')
-rwxr-xr-x | ranger/data/scope.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ranger/data/scope.sh b/ranger/data/scope.sh index 19404019..1b4a7b64 100755 --- a/ranger/data/scope.sh +++ b/ranger/data/scope.sh @@ -30,7 +30,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 "${path##*.}" | tr "[:upper:]" "[:lower:]") +extension=$(/bin/echo "${path##*.}" | awk '{print tolower($0)}') # Functions: # runs a command and saves its output into $output. Useful if you need |