From 65d452b96a2aa49b8f9155db9728f7d917f64306 Mon Sep 17 00:00:00 2001 From: hut Date: Mon, 13 Jun 2016 19:07:09 +0200 Subject: ext.rifle: improve recognition of rxvt terminals --- ranger/ext/rifle.py | 6 ++++++ 1 file changed, 6 insertions(+) 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.") -- cgit 1.4.1-2-gfad0