Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

fix completion #3355

Merged
merged 1 commit into from
Nov 17, 2020
Merged

fix completion #3355

merged 1 commit into from
Nov 17, 2020

Conversation

lalyos
Copy link
Contributor

@lalyos lalyos commented Nov 5, 2020

It seems that the completion command is not working.

Actually what happens that the generated shel completion script is only generated for the "completion" command not for the root "fluxctl" command.

Reproduce the issue

See how the generated functions tries to create a new completion for the command "completion"

$ fluxctl completion bash | tail -7

if [[ $(type -t compopt) = "builtin" ]]; then
    complete -o default -F __start_completion completion
else
    complete -o default -o nospace -F __start_completion completion
fi

Fix

After applying this patch , see the newly generated completion function:

$ ./fluxctl completion bash | tail -7

if [[ $(type -t compopt) = "builtin" ]]; then
    complete -o default -F __start_fluxctl fluxctl
else
    complete -o default -o nospace -F __start_fluxctl fluxctl
fi

Copy link
Member

@hiddeco hiddeco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch 🐟

One small thing, we require commits to be signed-off before we can merge. The failed action will tell you how to do this: https://github.com/fluxcd/flux/runs/1359439198

Signed-off-by: lalyos <[email protected]>
@lalyos
Copy link
Contributor Author

lalyos commented Nov 6, 2020

@hiddeco DCO is fixed now ...

@hiddeco hiddeco merged commit 75e01c1 into fluxcd:master Nov 17, 2020
@lalyos lalyos deleted the fix-completion branch November 17, 2020 12:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants