mirror of
https://github.com/TECHNOFAB11/pay-respects.git
synced 2025-12-12 06:20:09 +01:00
feat: multiline alias expansion
This commit is contained in:
parent
ae7307ad3a
commit
f1f7ed8dbe
3 changed files with 29 additions and 21 deletions
|
|
@ -117,12 +117,7 @@ pub fn runtime_match(
|
|||
if pure_suggest.contains("{{command}}") {
|
||||
pure_suggest = pure_suggest.replace("{{command}}", last_command);
|
||||
}
|
||||
return eval_suggest(
|
||||
&pure_suggest,
|
||||
last_command,
|
||||
error_msg,
|
||||
shell
|
||||
);
|
||||
return eval_suggest(&pure_suggest, last_command, error_msg, shell);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -150,12 +145,7 @@ fn eval_condition(
|
|||
}
|
||||
}
|
||||
|
||||
fn eval_suggest(
|
||||
suggest: &str,
|
||||
last_command: &str,
|
||||
error_msg: &str,
|
||||
shell: &str,
|
||||
) -> Option<String> {
|
||||
fn eval_suggest(suggest: &str, last_command: &str, error_msg: &str, shell: &str) -> Option<String> {
|
||||
let mut suggest = suggest.to_owned();
|
||||
if suggest.contains("{{command}}") {
|
||||
suggest = suggest.replace("{{command}}", "{last_command}");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue