Skip to content

fix bash completion install command#189

Open
a-fleming wants to merge 1 commit into
bootdotdev:mainfrom
a-fleming:fix/bash-completion-help
Open

fix bash completion install command#189
a-fleming wants to merge 1 commit into
bootdotdev:mainfrom
a-fleming:fix/bash-completion-help

Conversation

@a-fleming

Copy link
Copy Markdown

Summary

Fixes the Linux bash completion install example in the generated Cobra help text.

The previous command used shell redirection directly into /etc/bash_completion.d/bootdev, which usually fails for non-root users:

bootdev completion bash > /etc/bash_completion.d/bootdev

The updated command uses sudo tee so only the file write is elevated:

bootdev completion bash | sudo tee /etc/bash_completion.d/bootdev > /dev/null

Testing

Ran:

go test ./...
go run . help completion bash

go test ./... passes. Verified that the Linux bash completion example now uses sudo tee.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant