about summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorToon Nolten <toon.nolten@student.kuleuven.be>2019-08-18 15:05:08 +0200
committerToon Nolten <toon.nolten@student.kuleuven.be>2019-08-18 15:15:50 +0200
commit9511bd6e6b0d8a3e8ce04b723cf4903b81db1b61 (patch)
treeb2cc8b2a46b9f65eda963aaac852e1a918502643 /ranger
parent498ac4ffa7b90d385de6078a9162606a6bc524c3 (diff)
downloadranger-9511bd6e6b0d8a3e8ce04b723cf4903b81db1b61.tar.gz
Drop truth values; rename warning setting
Diffstat (limited to 'ranger')
-rw-r--r--ranger/config/rc.conf2
-rw-r--r--ranger/container/settings.py3
-rw-r--r--ranger/core/main.py6
3 files changed, 5 insertions, 6 deletions
diff --git a/ranger/config/rc.conf b/ranger/config/rc.conf
index 70701edf..00a20def 100644
--- a/ranger/config/rc.conf
+++ b/ranger/config/rc.conf
@@ -303,7 +303,7 @@ set size_in_bytes false
 
 # Warn at startup if RANGER_LEVEL env var is greater than 0, in other words
 # give a warning when you nest ranger in a subshell started by ranger.
-# Special value "bad" makes the warning more visible.
+# Special value "error" makes the warning more visible.
 set nested_ranger_warning true
 
 # ===================================================================
diff --git a/ranger/container/settings.py b/ranger/container/settings.py
index 58e9df2e..0b098659 100644
--- a/ranger/container/settings.py
+++ b/ranger/container/settings.py
@@ -106,8 +106,7 @@ ALLOWED_VALUES = {
     'confirm_on_delete': ['multiple', 'always', 'never'],
     'draw_borders': ['none', 'both', 'outline', 'separators'],
     'line_numbers': ['false', 'absolute', 'relative'],
-    'nested_ranger_warning': ['true', 'false', 'yes', 'no', 'enabled',
-                              'disabled', 'bad'],
+    'nested_ranger_warning': ['true', 'false', 'error'],
     'one_indexed': [False, True],
     'preview_images_method': ['w3m', 'iterm2', 'terminology',
                               'urxvt', 'urxvt-full', 'kitty',
diff --git a/ranger/core/main.py b/ranger/core/main.py
index bc0b742a..aefaacbc 100644
--- a/ranger/core/main.py
+++ b/ranger/core/main.py
@@ -183,10 +183,10 @@ def main(
         if int(os.environ[level]) > 1:
             warning = 'Warning:'
             nested_warning = "You're in a nested ranger instance!"
-            nrw = fm.settings.nested_ranger_warning.lower()
-            if nrw in ['true', 'yes', 'enabled']:
+            warn_when_nested = fm.settings.nested_ranger_warning.lower()
+            if warn_when_nested == 'true':
                 fm.notify(' '.join((warning, nested_warning)), bad=False)
-            elif nrw == 'bad':
+            elif warn_when_nested == 'error':
                 fm.notify(' '.join((warning.upper(), nested_warning + '!!')),
                           bad=True)