Compare commits

..

2 commits

Author SHA1 Message Date
b7f5e8d045 Merge branch 'env-vars' into help-topics 2024-03-14 16:54:28 -04:00
58ff8fde2a default window name now sets correctly 2024-03-14 16:51:40 -04:00

View file

@ -174,10 +174,16 @@ pub fn new(pargs: &mut Arguments) {
if let Some(command) = command { new.shell_command = Some(command.to_string_lossy()); } if let Some(command) = command { new.shell_command = Some(command.to_string_lossy()); }
if detached { new.detached = true; } if detached { new.detached = true; }
if let Ok(target_dir) = target_dir { new = new.start_directory(target_dir); } if let Ok(target_dir) = target_dir { new = new.start_directory(target_dir); }
if !window_name.is_empty() { new.window_name = Some(window_name.into()); }
Tmux::new() let mut tmux = Tmux::new().add_command(new);
.add_command(new)
.output().ok(); // rename window if var not empty
if !window_name.is_empty() {
let auto_name = commands::RenameWindow::new()
.new_name(window_name);
tmux = tmux.add_command(auto_name);
}
tmux.output().ok();
} }