summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rwxr-xr-xranger/data/scope.sh2
-rwxr-xr-xranger/ext/rifle.py2
2 files changed, 2 insertions, 2 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
diff --git a/ranger/ext/rifle.py b/ranger/ext/rifle.py
index 504851b1..5d13a5bf 100755
--- a/ranger/ext/rifle.py
+++ b/ranger/ext/rifle.py
@@ -231,7 +231,7 @@ class Rifle(object):
             self._app_flags = argument
             return True
         elif function == 'X':
-            return 'DISPLAY' in os.environ
+            return sys.platform == 'darwin' or 'DISPLAY' in os.environ
         elif function == 'env':
             return bool(os.environ.get(argument))
         elif function == 'else':