Skip to content

Commit

Permalink
cmd: Use private custom func to fix clash between rclone and kubectl
Browse files Browse the repository at this point in the history
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
  • Loading branch information
ncw committed Feb 13, 2019
1 parent 9310c7f commit 647b3ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/help.go
Expand Up @@ -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
Expand Down

0 comments on commit 647b3ba

Please sign in to comment.