fix: missing space in opts

This commit is contained in:
iff 2025-01-06 16:10:00 +01:00
parent 25e8f5875b
commit 3460d66aac
3 changed files with 5 additions and 3 deletions

View file

@ -30,7 +30,9 @@ pub fn opts(suggest: &mut String, last_command: &mut String, opt_list: &mut Vec<
let regex = opt.trim();
let current_tag = tag(tag_name, replace_tag);
opt_list.push((current_tag.clone(), opt_regex(regex, last_command)));
let opts = format!(" {}", opt_regex(regex, last_command));
opt_list.push((current_tag.clone(), opts));
suggest.replace_range(placeholder, &current_tag);
replace_tag += 1;

View file

@ -43,7 +43,7 @@ pub fn opts(
let current_tag = tag(tag_name, replace_tag);
let token_tag: TokenStream2 = format!("{}{}", tag_name, replace_tag).parse().unwrap();
let command = quote! {
let #token_tag = opt_regex(#regex, &mut last_command);
let #token_tag = format!(" {}", opt_regex(#regex, &mut last_command));
};
opt_list.push(command);

View file

@ -11,7 +11,7 @@ suggest = [
[[match_err]]
pattern = [
"cannot create directory",
"cannot create",
]
suggest = [
'''