diff options
author | hut <hut@lepus.uberspace.de> | 2016-06-13 19:07:09 +0200 |
---|---|---|
committer | hut <hut@lepus.uberspace.de> | 2016-06-13 19:07:09 +0200 |
commit | 65d452b96a2aa49b8f9155db9728f7d917f64306 (patch) | |
tree | 0174e131c0016150983989c0d24f77a752d4e4b3 | |
parent | c256b5d0687688630d0eb2ede9dfbe481eef6969 (diff) | |
download | ranger-65d452b96a2aa49b8f9155db9728f7d917f64306.tar.gz |
ext.rifle: improve recognition of rxvt terminals
-rwxr-xr-x | ranger/ext/rifle.py | 6 |
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.") |