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

Completion and usage message output should use name of invoked command, not "hassio-cli" #140

Closed
scop opened this issue Jan 7, 2019 · 0 comments · Fixed by #143
Closed
Labels

Comments

@scop
Copy link
Member

scop commented Jan 7, 2019

As discussed in #138, when one issues the completion command to output bash completion, the output is always applied to the command name hassio-cli. This is a problem if the command is installed under a different name, e.g. hassio.

The same problem seems to be in a lot of other places as well, for example usage messages say hassio-cli no matter what the executable's filename is.

The fix would be to use the invoked command's name in usage messages and bash completion output etc.

@mjrider mjrider added the bug label Jan 10, 2019
mjrider added a commit to mjrider/hassio-cli that referenced this issue Jan 15, 2019
This fixes home-assistant#140 by looking at the name of the binary used to invoke the
cli.

as side effect, the completion and help contain the whatever used to
invoke the binary, using go run for example with use the name `main`
mjrider added a commit to mjrider/hassio-cli that referenced this issue Jan 15, 2019
This fixes home-assistant#140 by looking at the name of the binary used to invoke the
cli.

as side effect, the completion and help contain the whatever used to
invoke the binary, using go run for example with use the name `main`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants