mirror of
https://github.com/TECHNOFAB11/pay-respects.git
synced 2025-12-11 22:10:09 +01:00
fix: opts spacing
This commit is contained in:
parent
e53c61cb59
commit
87be5ffacb
5 changed files with 26 additions and 7 deletions
|
|
@ -30,7 +30,14 @@ 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);
|
||||
|
||||
let opts = format!(" {}", opt_regex(regex, last_command));
|
||||
let opts = {
|
||||
let caps = opt_regex(regex, last_command);
|
||||
if caps.is_empty() {
|
||||
"".to_string()
|
||||
} else {
|
||||
format!(" {}", caps)
|
||||
}
|
||||
};
|
||||
|
||||
opt_list.push((current_tag.clone(), opts));
|
||||
suggest.replace_range(placeholder, ¤t_tag);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue