user_startup

Function extract_name_from_cmd

Source
pub fn extract_name_from_cmd(cmd: &str) -> String
Expand description

Extract the script name from a command.

ยงExamples

use user_startup::extract_name_from_cmd;
assert_eq!(extract_name_from_cmd("test.ps1"), "test");
assert_eq!(extract_name_from_cmd("D:\\no_install_software\\syncthing\\syncthing.exe"), "syncthing");