mirror of
https://github.com/TECHNOFAB11/pay-respects.git
synced 2025-12-12 22:40:09 +01:00
fix: tokenize eval shell
This commit is contained in:
parent
e13cc01fe8
commit
71c431031f
1 changed files with 4 additions and 2 deletions
|
|
@ -281,12 +281,14 @@ pub fn select(suggest: &mut String, select_list: &mut Vec<TokenStream2>) {
|
||||||
let command = if selection_list[0].starts_with("eval_shell_command(") {
|
let command = if selection_list[0].starts_with("eval_shell_command(") {
|
||||||
let function = selection_list.join(",");
|
let function = selection_list.join(",");
|
||||||
// add a " after first comma, and a " before last )
|
// add a " after first comma, and a " before last )
|
||||||
let function = format!(
|
let function: TokenStream2 = format!(
|
||||||
"{}\"{}{}",
|
"{}\"{}{}",
|
||||||
&function[..function.find(',').unwrap() + 1],
|
&function[..function.find(',').unwrap() + 1],
|
||||||
&function[function.find(',').unwrap() + 1..function.len() - 1],
|
&function[function.find(',').unwrap() + 1..function.len() - 1],
|
||||||
"\")"
|
"\")"
|
||||||
);
|
)
|
||||||
|
.parse()
|
||||||
|
.unwrap();
|
||||||
quote! {
|
quote! {
|
||||||
let selects = #function;
|
let selects = #function;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue