From b3db38ae3150aad2764a50728e9fddaa3a17ce31 Mon Sep 17 00:00:00 2001 From: Danil Semelenov Date: Wed, 4 Sep 2019 12:29:20 +0300 Subject: [PATCH] Disable __rclone_custom_func if posix mode is on A workaround for #3489. Code in `__rclone_custom_func` relies on process substitutions `<(...)` to preserve changes of variables within `while` bodies, which is not supported in the posix mode. --- cmd/help.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/help.go b/cmd/help.go index b474a9c34..3874db1e9 100644 --- a/cmd/help.go +++ b/cmd/help.go @@ -39,7 +39,7 @@ documentation, changelog and configuration walkthroughs. const ( bashCompletionFunc = ` __rclone_custom_func() { - if [[ ${#COMPREPLY[@]} -eq 0 ]]; then + if [[ ${#COMPREPLY[@]} -eq 0 && :$SHELLOPTS: != *:posix:* ]]; then local cur cword prev words if declare -F _init_completion > /dev/null; then _init_completion -n : || return