mirror of
https://github.com/nikolassv/bartib
synced 2025-02-26 03:47:09 +00:00
fixed fish completion for continue subcommand
This commit is contained in:
parent
045c190dbd
commit
026d8ffa84
2 changed files with 4 additions and 3 deletions
|
@ -36,7 +36,8 @@ function __fish_complete_bartib_numbers
|
|||
set -l description_and_project (string match -r '(\\e\[4mDescription.*)(\\e\[4mProject.*)' -g $output)
|
||||
set -l description_length (math (string length $description_and_project[1]) - 9)
|
||||
set -l project_length (math (string length $description_and_project[2]) - 8)
|
||||
string trim --right (string match -r '(\d\t.*)' -g (string replace -r (echo "\[(\d)\] ([[:ascii:]]{0,$description_length})[^[:ascii:]]*([[:ascii:]]{0,$project_length}).*") '$1\t$3->$2' $output))
|
||||
set -l description_project_re "\[(\d+)\][^[:ascii:]]* ([[:ascii:]]{0,$description_length})[^[:ascii:]]*([[:ascii:]]{0,$project_length}).*"
|
||||
string trim --right (string match -r '(\d+\t.*)' -g (string replace -r $description_project_re '$1\t$3->$2' $output))
|
||||
end
|
||||
|
||||
function __fish_complete_bartib_descriptions
|
||||
|
|
|
@ -256,7 +256,7 @@ fn write_cells<T: AsRef<str> + std::fmt::Display>(
|
|||
for (width, wrapped_cell) in column_width.iter().zip(wrapped_cells.iter()) {
|
||||
match wrapped_cell.get(line) {
|
||||
Some(c) => write_with_width_and_style(f, c, width, style)?,
|
||||
None => write!(f, "{} ", "\u{a0}".repeat(*width))?,
|
||||
None => write!(f, "{} ", "\u{a0}".repeat(*width))?, // pad with non breaking space
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -282,7 +282,7 @@ fn write_with_width_and_style(
|
|||
// space will be styled (e.g. underlined)
|
||||
write!(
|
||||
f,
|
||||
"{prefix}{content:\u{a0}<width$}{suffix} ",
|
||||
"{prefix}{content:\u{a0}<width$}{suffix} ", // pad with non breaking space
|
||||
prefix = style_prefix,
|
||||
content = content,
|
||||
width = width,
|
||||
|
|
Loading…
Add table
Reference in a new issue