mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-29 06:13:20 +00:00
completions/rclone: Add version parsing
This had a weird, unnecessary and terrible backwards-incompatibility
in how you get the completions out.
I do not like it but I am in a good enough mood to work around it.
See #9878.
(cherry picked from commit bfd97adbda
)
This commit is contained in:
parent
330942cc30
commit
7b9dafb9e4
1 changed files with 10 additions and 1 deletions
|
@ -1 +1,10 @@
|
|||
rclone completion fish - | source
|
||||
set -l rclone_version (rclone version | string match -rg 'rclone v(.*)' | string split .)
|
||||
or return
|
||||
|
||||
# Yes, rclone's parsing here has changed, now they *require* a `-` argument
|
||||
# where previously they required *not* having it.
|
||||
if test "$rclone_version[1]" -gt 1; or test "$rclone_version[2]" -gt 62
|
||||
rclone completion fish - 2>/dev/null | source
|
||||
else
|
||||
rclone completion fish 2>/dev/null | source
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue