mirror of
https://github.com/TECHNOFAB11/pay-respects.git
synced 2025-12-12 06:20:09 +01:00
refactor: shell syntax
This commit is contained in:
parent
bdc1327d29
commit
e297aa3def
3 changed files with 18 additions and 20 deletions
|
|
@ -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(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue