diff options
author | toonn <toonn@toonn.io> | 2018-02-16 16:06:27 +0100 |
---|---|---|
committer | toonn <toonn@toonn.io> | 2018-02-16 16:06:27 +0100 |
commit | c0a0e90e405bac4dfc5819df429d567e8a51650d (patch) | |
tree | 3a5e089a1d7e36b6b367fad0f2ac3b67c3fb2549 | |
parent | 324e5af2e7ec0a825305dc6a03c95efa3682869a (diff) | |
download | ranger-c0a0e90e405bac4dfc5819df429d567e8a51650d.tar.gz |
Make scope.sh backwards compatible with bash v3
Bash v3 doesn't support the `,,` syntax for lowercasing. This is relevant on Mac OS which still comes with bash v3.2. Using `:upper:` and `:lower:` with `tr` takes into account the locale so this allows letters with diacritical marks in extensions. This behavior may not be desirable. Fixes #1072
-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 35021129..540a910e 100755 --- a/ranger/data/scope.sh +++ b/ranger/data/scope.sh @@ -31,7 +31,7 @@ IMAGE_CACHE_PATH="${4}" # Full path that should be used to cache image preview PV_IMAGE_ENABLED="${5}" # 'True' if image previews are enabled, 'False' otherwise. FILE_EXTENSION="${FILE_PATH##*.}" -FILE_EXTENSION_LOWER="${FILE_EXTENSION,,}" +FILE_EXTENSION_LOWER=$(echo ${FILE_EXTENSION} | tr '[:upper:]' '[:lower:]') # Settings HIGHLIGHT_SIZE_MAX=262143 # 256KiB |