Fix 'compopt: command not found' on autocomplete on macOS

As reported in #3489.
This commit is contained in:
Danil Semelenov 2019-09-04 12:04:43 +03:00 committed by Nick Craig-Wood
parent 89b6d89077
commit c0d1869204

View File

@ -67,9 +67,9 @@ __rclone_custom_func() {
local reply=${prefix:+$prefix/}$line local reply=${prefix:+$prefix/}$line
[[ $reply != $path* ]] || COMPREPLY+=("$reply") [[ $reply != $path* ]] || COMPREPLY+=("$reply")
done < <(rclone lsf "${cur%%:*}:$prefix" 2>/dev/null) done < <(rclone lsf "${cur%%:*}:$prefix" 2>/dev/null)
[[ ! ${COMPREPLY[@]} ]] || compopt -o filenames [[ ! ${COMPREPLY[@]} || $(type -t compopt) != builtin ]] || compopt -o filenames
fi fi
[[ ! ${COMPREPLY[@]} ]] || compopt -o nospace [[ ! ${COMPREPLY[@]} || $(type -t compopt) != builtin ]] || compopt -o nospace
fi fi
} }
` `