parent
d3b0bed091
commit
e2773b3b4e
1 changed files with 3 additions and 2 deletions
|
@ -46,10 +46,11 @@ __rclone_custom_func() {
|
||||||
else
|
else
|
||||||
__rclone_init_completion -n : || return
|
__rclone_init_completion -n : || return
|
||||||
fi
|
fi
|
||||||
|
local rclone=(command rclone --ask-password=false)
|
||||||
if [[ $cur != *:* ]]; then
|
if [[ $cur != *:* ]]; then
|
||||||
local ifs=$IFS
|
local ifs=$IFS
|
||||||
IFS=$'\n'
|
IFS=$'\n'
|
||||||
local remotes=($(command rclone listremotes))
|
local remotes=($("${rclone[@]}" listremotes 2> /dev/null))
|
||||||
IFS=$ifs
|
IFS=$ifs
|
||||||
local remote
|
local remote
|
||||||
for remote in "${remotes[@]}"; do
|
for remote in "${remotes[@]}"; do
|
||||||
|
@ -68,7 +69,7 @@ __rclone_custom_func() {
|
||||||
fi
|
fi
|
||||||
local ifs=$IFS
|
local ifs=$IFS
|
||||||
IFS=$'\n'
|
IFS=$'\n'
|
||||||
local lines=($(rclone lsf "${cur%%:*}:$prefix" 2>/dev/null))
|
local lines=($("${rclone[@]}" lsf "${cur%%:*}:$prefix" 2> /dev/null))
|
||||||
IFS=$ifs
|
IFS=$ifs
|
||||||
local line
|
local line
|
||||||
for line in "${lines[@]}"; do
|
for line in "${lines[@]}"; do
|
||||||
|
|
Loading…
Reference in a new issue