From 2114fd8f2677a67b8c1bf753adb4d93b3c2862f8 Mon Sep 17 00:00:00 2001 From: Six Date: Tue, 19 Feb 2019 11:15:27 -0800 Subject: [PATCH] cmd: Fix tab-completion for remotes with underscores in their names --- cmd/help.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/help.go b/cmd/help.go index 066963fff..3bbe191ec 100644 --- a/cmd/help.go +++ b/cmd/help.go @@ -45,7 +45,7 @@ __rclone_custom_func() { else __rclone_init_completion -n : || return fi - if [[ $cur =~ ^[[:alnum:]]*$ ]]; then + if [[ $cur =~ ^[[:alnum:]_]*$ ]]; then local remote while IFS= read -r remote; do [[ $remote != $cur* ]] || COMPREPLY+=("$remote") @@ -54,7 +54,7 @@ __rclone_custom_func() { local paths=("$cur"*) [[ ! -f ${paths[0]} ]] || COMPREPLY+=("${paths[@]}") fi - elif [[ $cur =~ ^[[:alnum:]]+: ]]; then + elif [[ $cur =~ ^[[:alnum:]_]+: ]]; then local path=${cur#*:} if [[ $path == */* ]]; then local prefix=${path%/*}