about summary refs log tree commit diff stats
path: root/ranger/gui/ui.py
diff options
context:
space:
mode:
authortoonn <toonn@toonn.io>2020-03-04 11:47:21 +0100
committertoonn <toonn@toonn.io>2020-03-04 11:47:21 +0100
commit2460c2ad6a2f528104deb263a81086e03713081e (patch)
tree5345ceb3679ce9c5282edbf20f947e7329011d41 /ranger/gui/ui.py
parent1cdcce0a44d031be13009a70e25cc4cf75789eac (diff)
downloadranger-2460c2ad6a2f528104deb263a81086e03713081e.tar.gz
Drop double setting and prefer basename over split
Diffstat (limited to 'ranger/gui/ui.py')
-rw-r--r--ranger/gui/ui.py6
1 files 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()