refactor: shell syntax

This commit is contained in:
iff 2025-04-05 00:10:16 +02:00
parent bdc1327d29
commit e297aa3def
3 changed files with 18 additions and 20 deletions

View file

@ -691,13 +691,11 @@ pub fn get_shell() -> String {
}
}
pub fn shell_syntax(shell: &str, command: &mut String) {
pub fn shell_syntax(shell: &str, command: &str) -> String {
#[allow(clippy::single_match)]
match shell {
"nu" => {
*command = command.replace(" && ", " ; ");
}
_ => {}
"nu" => command.replace("&&", ";").to_string(),
_ => command.to_string(),
}
}