Fixed terminal title

This commit is contained in:
2026-03-20 00:22:01 +01:00 Verified
parent 9592d05744
commit 046548a927
+1 -3
View File
@@ -30,19 +30,17 @@ fn main() {
.creation_flags(CREATE_NO_WINDOW) .creation_flags(CREATE_NO_WINDOW)
.spawn(); .spawn();
} else { } else {
// Extract just the script name
let script_name = Path::new(&args[0]) let script_name = Path::new(&args[0])
.file_name() .file_name()
.map(|s| s.to_string_lossy().into_owned()) .map(|s| s.to_string_lossy().into_owned())
.unwrap_or_else(|| String::from("Script")); .unwrap_or_else(|| String::from("Script"));
// Format the exact title you want
let tab_title = format!("Python > {}", script_name); let tab_title = format!("Python > {}", script_name);
let mut cmd_args = vec![ let mut cmd_args = vec![
String::from("/k"), String::from("/k"),
String::from("TITLE"), String::from("TITLE"),
tab_title, // Apply your custom title here tab_title,
String::from("&"), String::from("&"),
String::from("python"), String::from("python"),
]; ];