From 2460c2ad6a2f528104deb263a81086e03713081e Mon Sep 17 00:00:00 2001 From: toonn Date: Wed, 4 Mar 2020 11:47:21 +0100 Subject: Drop double setting and prefer basename over split --- ranger/gui/ui.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ranger/gui/ui.py b/ranger/gui/ui.py index dc4379ac..a2ea7778 100644 --- a/ranger/gui/ui.py +++ b/ranger/gui/ui.py @@ -85,7 +85,6 @@ class UI( # pylint: disable=too-many-instance-attributes,too-many-public-method self._draw_title = None self._tmux_automatic_rename = None self._multiplexer_title = None - self._multiplexer_title = None self.browser = None if fm is not None: @@ -513,9 +512,8 @@ class UI( # pylint: disable=too-many-instance-attributes,too-many-public-method " name, won't be able to restore.", bad=False) if not self._multiplexer_title: - self._multiplexer_title = os.environ.get( - "SHELL", - "shell").split("/")[-1] + self._multiplexer_title = os.path.basename( + os.environ.get("SHELL", "shell")) sys.stdout.write("\033kranger\033\\") sys.stdout.flush() -- cgit 1.4.1-2-gfad0