FairwindsOps / pluto

A cli tool to help discover deprecated apiVersions in Kubernetes
https://fairwinds.com
Apache License 2.0
2.1k stars 124 forks source link

Error message in bash completion #551

Open azacchino opened 2 weeks ago

azacchino commented 2 weeks ago

What happened?

Hi, thanks for this great program.

I added pletion to my bashrc script and noticed that there was a message constantly.

if command -v pluto >/dev/null 2>&1; then
  source <(pluto completion bash)
fi

image

This is because the message is output to stderr.

https://github.com/FairwindsOps/pluto/blob/2fc7c1b32ffa24484eaa1d92f4300df73badf140/cmd/root.go#L176

I set the error to null to ignore it.

if command -v pluto >/dev/null 2>&1; then
  source <(pluto completion bash 2>/dev/null)
fi

But could it be a bug?

What did you expect to happen?

No error mesage

How can we reproduce this?

Just add to your .bashrc

if command -v pluto >/dev/null 2>&1; then
  source <(pluto completion bash)
fi

Version

Version:5.19.3 Commit:bf07bd3d2db3ff121fb3640b8230b1c800e0a20d

Search

Code of Conduct

Additional context

No response

aslafy-z commented 2 weeks ago

You might want to use the --no-footer cli flag.