mirror of
https://github.com/tealdeer-rs/tealdeer.git
synced 2026-08-23 08:34:18 +02:00
Guard Fish completion when cache is empty (#331)
Signed-off-by: Adam Henley <adamazing@gmail.com>
This commit is contained in:
parent
8c6754ae78
commit
45b3db6dc4
1 changed files with 3 additions and 1 deletions
|
|
@ -20,7 +20,9 @@ complete -c tldr -l seed-config -d 'Create a basic config.' -f
|
|||
complete -c tldr -l color -d 'Controls when to use color.' -xa 'always auto never'
|
||||
|
||||
function __tealdeer_entries
|
||||
tldr --list | string replace -a -i -r "\,\s" "\n"
|
||||
if set entries (tldr --list 2>/dev/null)
|
||||
string replace -a -i -r "\,\s" "\n" $entries
|
||||
end
|
||||
end
|
||||
|
||||
complete -f -c tldr -a '(__tealdeer_entries)'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue