mirror of
https://github.com/nikolassv/bartib
synced 2024-11-28 14:30:25 +00:00
Fix description completion in fish
This commit is contained in:
parent
3809086c4e
commit
045c190dbd
1 changed files with 2 additions and 2 deletions
|
@ -42,8 +42,8 @@ end
|
||||||
function __fish_complete_bartib_descriptions
|
function __fish_complete_bartib_descriptions
|
||||||
set -l output (bartib last -n 100 2>/dev/null)
|
set -l output (bartib last -n 100 2>/dev/null)
|
||||||
|
|
||||||
set -l description_match (string match -r '(\\e\[4mDescription.*)' -g $output)
|
set -l description_match (string match -r '(\\e\[4mDescription.*)\\e\[4mProject.*' -g $output)
|
||||||
set -l description_length (math (string length $description_match) - 9)
|
set -l description_length (math (string length $description_match) - 8)
|
||||||
string replace -r (echo "\[(\d)\] ([[:ascii:]]{0,$description_length}).*") '$2' (string match -r '\[\d\].*' $output)
|
string replace -r (echo "\[(\d)\] ([[:ascii:]]{0,$description_length}).*") '$2' (string match -r '\[\d\].*' $output)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue