1
0
mirror of https://github.com/bobwen-dev/hunter synced 2025-04-12 00:55:41 +02:00

fix title on terminal without tmux

This commit is contained in:
rabite 2019-04-06 15:57:11 +02:00
parent ff2f331947
commit 2fae1a143d

View File

@ -70,8 +70,10 @@ impl Screen {
}
pub fn set_title(&mut self, title: &str) -> HResult<()> {
if !self.terminal.starts_with("rxvt") {
write!(self, "\x1b]2;hunter: {}", title)?;
if self.terminal.starts_with("xterm") ||
self.terminal.starts_with("screen") ||
self.terminal.starts_with("tmux"){
write!(self, "\x1b]2;hunter: {}\x1b\\", title)?;
}
if self.terminal.starts_with("tmux") {
write!(self, "\x1bkhunter: {}\x1b\\", title)?;