cmd: Use private custom func to fix clash between rclone and kubectl

Before this change, rclone used the `__custom_func` hook to control
the completions of remote files.  However this clashes with other
cobra users, the most notable example being kubectl.

Upgrading cobra to master allows us to use a namespaced function
`__rclone_custom_func` which fixes the problem.

Fixes #1529
This commit is contained in:
Nick Craig-Wood 2019-02-13 14:15:21 +00:00
parent 5991315990
commit 38864adc9c

View file

@ -37,7 +37,7 @@ documentation, changelog and configuration walkthroughs.
const (
bashCompletionFunc = `
__custom_func() {
__rclone_custom_func() {
if [[ ${#COMPREPLY[@]} -eq 0 ]]; then
local cur cword prev words
if declare -F _init_completion > /dev/null; then