From 1b547b228ad3f55ad65096347ef4ec444de5330b Mon Sep 17 00:00:00 2001 From: Aram Drevekenin Date: Thu, 7 Aug 2025 11:35:04 +0200 Subject: [PATCH] fix: terminal title (#4352) --- zellij-utils/src/shared.rs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/zellij-utils/src/shared.rs b/zellij-utils/src/shared.rs index 37b413c1..759bc0f4 100644 --- a/zellij-utils/src/shared.rs +++ b/zellij-utils/src/shared.rs @@ -67,17 +67,17 @@ pub fn adjust_to_size(s: &str, rows: usize, columns: usize) -> String { } pub fn make_terminal_title(pane_title: &str) -> String { - // if we receive a title, we display it, otherwise we display the session name - if pane_title.is_empty() { - format!( - "\u{1b}]0;Zellij {}\u{07}", - get_session_name() - .map(|n| format!("({}) ", n)) - .unwrap_or_default() - ) - } else { - format!("\u{1b}]0;{}\u{07}", pane_title,) - } + format!( + "\u{1b}]0;{}{}\u{07}", + get_session_name() + .map(|n| if pane_title.is_empty() { + format!("{}", n) + } else { + format!("{} | ", n) + }) + .unwrap_or_default(), + pane_title + ) } // Colors