summary refs log tree commit diff stats
diff options
context:
space:
mode:
authornfnty <git@nfnty.se>2017-02-16 23:07:46 +0100
committernfnty <git@nfnty.se>2017-02-16 23:08:55 +0100
commitf2379b416f3f3b0fb0b369cc9b530872ae2b0e97 (patch)
tree750a850c622b2fdfa92490ebbf5b49d760a4bdaa
parent004badd136850ec48533eb3591b841d4ee38e156 (diff)
downloadranger-f2379b416f3f3b0fb0b369cc9b530872ae2b0e97.tar.gz
settings: Allow any capitalization of `RANGER_LOAD_DEFAULT_RC`
Fixes #810
-rw-r--r--ranger/core/fm.py2
-rw-r--r--ranger/core/main.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/ranger/core/fm.py b/ranger/core/fm.py
index 002ecc0f..53314ff7 100644
--- a/ranger/core/fm.py
+++ b/ranger/core/fm.py
@@ -287,7 +287,7 @@ class FM(Actions,  # pylint: disable=too-many-instance-attributes
             sys.stderr.write("\n> Please note that configuration files may "
                              "change as ranger evolves.\n  It's completely up to you to "
                              "keep them up to date.\n")
-            if os.environ.get('RANGER_LOAD_DEFAULT_RC', 0) != 'FALSE':
+            if os.environ.get('RANGER_LOAD_DEFAULT_RC', 'TRUE').upper() != 'FALSE':
                 sys.stderr.write("\n> To stop ranger from loading "
                                  "\033[1mboth\033[0m the default and your custom rc.conf,\n"
                                  "  please set the environment variable "
diff --git a/ranger/core/main.py b/ranger/core/main.py
index 32f4e111..a1a13dbc 100644
--- a/ranger/core/main.py
+++ b/ranger/core/main.py
@@ -332,7 +332,7 @@ def load_settings(  # pylint: disable=too-many-locals,too-many-branches,too-many
         custom_conf = fm.confpath('rc.conf')
         default_conf = fm.relpath('config', 'rc.conf')
 
-        if os.environ.get('RANGER_LOAD_DEFAULT_RC', 0) != 'FALSE':
+        if os.environ.get('RANGER_LOAD_DEFAULT_RC', 'TRUE').upper() != 'FALSE':
             fm.source(default_conf)
         if os.access(custom_conf, os.R_OK):
             fm.source(custom_conf)