Fixed terminal title
This commit is contained in:
+1
-3
@@ -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"),
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user