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.
This commit is contained in:
Danil Semelenov 2019-09-04 12:29:20 +03:00 committed by Nick Craig-Wood
parent c0d1869204
commit b3db38ae31

View file

@ -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