mirror of
https://github.com/TECHNOFAB11/pay-respects.git
synced 2025-12-12 14:30:10 +01:00
feat: in-line shell evaluation
This commit is contained in:
parent
8ae71443d6
commit
b5f2f139e4
4 changed files with 19 additions and 3 deletions
|
|
@ -188,7 +188,13 @@ pub fn shell_tag(suggest: &mut String, replace_list: &mut Vec<TokenStream2>, cmd
|
|||
if suggest.contains(&command) {
|
||||
|
||||
*suggest = suggest.replace(&command, &tag(tag_name, replace_tag));
|
||||
replace_list.push(rtag(tag_name, replace_tag, command));
|
||||
|
||||
let split = command.split_once(',').unwrap();
|
||||
let argument = split.1.trim_end_matches(')').trim();
|
||||
let argument = format!("\"{}\"", argument);
|
||||
let function = format!("{}, {}).join(\"\")", split.0, argument);
|
||||
// let function = format!("\"{}, {}\"", split.0, split.1);
|
||||
replace_list.push(rtag(tag_name, replace_tag, function));
|
||||
replace_tag += 1;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue