diff options
author | toonn <toonn@toonn.io> | 2020-03-04 11:47:21 +0100 |
---|---|---|
committer | toonn <toonn@toonn.io> | 2020-03-04 11:47:21 +0100 |
commit | 2460c2ad6a2f528104deb263a81086e03713081e (patch) | |
tree | 5345ceb3679ce9c5282edbf20f947e7329011d41 | |
parent | 1cdcce0a44d031be13009a70e25cc4cf75789eac (diff) | |
download | ranger-2460c2ad6a2f528104deb263a81086e03713081e.tar.gz |
Drop double setting and prefer basename over split
-rw-r--r-- | ranger/gui/ui.py | 6 |
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() |