feat(tab-bar): add command status and abbreviated cwd indicators
The tab bar only showed the window title, so it was impossible to tell at a glance whether the last command failed or which directory a tab was in. Expose the active window's last exit status and a compact working directory to tab_title_template, and refresh the tab bar when a command finishes.
This commit is contained in:
5 files changed
+157
-11
No files matched your search
@@ -2056,6 +2056,8 @@ class Window:
|
||||
self.last_cmd_exit_status = int(exit_status)
|
||||
except Exception:
|
||||
self.last_cmd_exit_status = 0
|
||||
if (tab := self.tabref()) is not None:
|
||||
tab.mark_tab_bar_dirty()
|
||||
end_time = monotonic()
|
||||
last_cmd_output_duration = end_time - self.last_cmd_output_start_time
|
||||
self.last_cmd_output_start_time = 0.0
|
||||
|
||||
Reference in new issue
Block a user