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)
.spawn();
} else {
// Extract just the script name
let script_name = Path::new(&args[0])
.file_name()
.map(|s| s.to_string_lossy().into_owned())
.unwrap_or_else(|| String::from("Script"));
// Format the exact title you want
let tab_title = format!("Python > {}", script_name);
let mut cmd_args = vec![
String::from("/k"),
String::from("TITLE"),
tab_title, // Apply your custom title here
tab_title,
String::from("&"),
String::from("python"),
];