summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lepus.uberspace.de>2016-06-13 19:07:09 +0200
committerhut <hut@lepus.uberspace.de>2016-06-13 19:07:09 +0200
commit65d452b96a2aa49b8f9155db9728f7d917f64306 (patch)
tree0174e131c0016150983989c0d24f77a752d4e4b3
parentc256b5d0687688630d0eb2ede9dfbe481eef6969 (diff)
downloadranger-65d452b96a2aa49b8f9155db9728f7d917f64306.tar.gz
ext.rifle: improve recognition of rxvt terminals
-rwxr-xr-xranger/ext/rifle.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/ranger/ext/rifle.py b/ranger/ext/rifle.py
index a8d8bee7..eadbc110 100755
--- a/ranger/ext/rifle.py
+++ b/ranger/ext/rifle.py
@@ -354,6 +354,12 @@ class Rifle(object):
                         term = os.environ['TERM']
                         if term.startswith('rxvt-unicode'):
                             term = 'urxvt'
+                        elif term.startswith('rxvt-'):
+                            # Sometimes urxvt calls itself "rxvt-256color"
+                            if 'rxvt' in get_executables():
+                                term = 'rxvt'
+                            else:
+                                term = 'urxvt'
                         if term not in get_executables():
                             self.hook_logger("Can not determine terminal command.  "
                                 "Please set $TERMCMD manually.")