Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bash completion error #275

Open
MAHDTech opened this issue Jul 20, 2023 · 1 comment
Open

Bash completion error #275

MAHDTech opened this issue Jul 20, 2023 · 1 comment
Labels
bug This issue describes a defect or unexpected behavior carvel-accepted This issue should be considered for future work and that the triage process has been completed hacktoberfest Hacktoberfest issue priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.

Comments

@MAHDTech
Copy link

MAHDTech commented Jul 20, 2023

What steps did you take:

source <(vendir completion bash)

What happened:

source <(vendir completion bash)
bash: Succeeded: command not found
echo $?
127

What did you expect:

source <(vendir completion bash)
echo $?
0

Anything else you would like to add:

A minor issue for the team is when loading bash completion, the word "Succeeded" is printed to stdout as per here.

When sourced as shown above, this causes bash to try and run Succeeded as a command resulting in

bash: Succeeded: command not found

A workaround is as follows but would be nice to be the same as other carvel tools.

source <(vendir completion bash | grep -v "Succeeded")

Environment:

  • Debian Linux
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
  • vendir version v0.34.3

Vote on this request

This is an invitation to the community to vote on issues, to help us prioritize our backlog. Use the "smiley face" up to the right of this comment to vote.

👍 "I would like to see this addressed as soon as possible"
👎 "There are other more important things to focus on right now"

We are also happy to receive and review Pull Requests if you want to help working on this issue.

@MAHDTech MAHDTech added bug This issue describes a defect or unexpected behavior carvel-triage This issue has not yet been reviewed for validity labels Jul 20, 2023
@praveenrewar
Copy link
Member

Hey @MAHDTech! Thanks for pointing this out. The completion command is the courtesy of cobra, we didn't add it manually and so didn't notice that this issue is present in vendir as well (similar to kapp and imgpkg where it has been fixed).
Would you like to make a PR with a fix similar to this?
There is just one catch, we need to add the "completion" command here before we can use IsCobraManagedCommand function, so we will need 2 PRs to fix this (the first one in cppforlife/cobrautil)

@praveenrewar praveenrewar added carvel-accepted This issue should be considered for future work and that the triage process has been completed priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. and removed carvel-triage This issue has not yet been reviewed for validity labels Jul 27, 2023
@joaopapereira joaopapereira added the hacktoberfest Hacktoberfest issue label Sep 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue describes a defect or unexpected behavior carvel-accepted This issue should be considered for future work and that the triage process has been completed hacktoberfest Hacktoberfest issue priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete.
Projects
Status: No status
Development

No branches or pull requests

3 participants