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

No such command 'completion' for homeassistant-cli 0.9.4 build #367

Closed
chenrui333 opened this issue Jun 21, 2021 · 13 comments
Closed

No such command 'completion' for homeassistant-cli 0.9.4 build #367

chenrui333 opened this issue Jun 21, 2021 · 13 comments

Comments

@chenrui333
Copy link
Contributor

==> /opt/homebrew/Cellar/homeassistant-cli/0.9.4/bin/hass-cli completion bash
Usage: hass-cli [OPTIONS] COMMAND [ARGS]...
Try 'hass-cli --help' for help.

Error: No such command 'completion'.

relates to Homebrew/homebrew-core#79691

@fabaff
Copy link
Member

fabaff commented Jun 21, 2021

It's came up for the NixOS packages as well.

The completion needs to be ported to work with click > 8.0.

@MostHated
Copy link

I ran into this just now when I installed via pip on Pop_OS 20.10

lwille pushed a commit to lwille/home-assistant-cli that referenced this issue Aug 6, 2021
lwille pushed a commit to lwille/home-assistant-cli that referenced this issue Aug 9, 2021
@onkelbeh
Copy link
Contributor

onkelbeh commented Oct 7, 2021

I tried the fix from #369, seems not to work for me:

root@g18-hasstest:~ # bash --version
GNU bash, Version 5.1.8(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2020 Free Software Foundation, Inc.
Lizenz GPLv3+: GNU GPL Version 3 oder jünger <http://gnu.org/licenses/gpl.html>

Dies ist freie Software. Sie darf verändert und verteilt werden.
Es wird keine Garantie gewährt, soweit das Gesetz es zulässt.
root@g18-hasstest:~ # source <(_HASS_CLI_COMPLETE=bash_source hass-cli)
error: RuntimeError: Couldn't detect Bash version, shell completion is not supported.
root@g18-hasstest:~ #

Perhaps @lwille could take a look.

Seems to depend on locale, works with C.utf8 & POSIX, the others fail.

root@g18-hasstest:~ # eselect locale list
Available targets for the LANG variable:
  [1]   C
  [2]   C.utf8
  [3]   de_DE.utf8 *
  [4]   en_US.utf8
  [5]   POSIX
  [ ]   (free form)
root@g18-hasstest:~ # eselect locale set 2
Setting LANG to C.utf8 ...
Run ". /etc/profile" to update the variable in your shell.
root@g18-hasstest:~ # . /etc/profile
root@g18-hasstest:~ # source <(_HASS_CLI_COMPLETE=bash_source hass-cli)
root@g18-hasstest:~ #

@onkelbeh
Copy link
Contributor

onkelbeh commented Oct 7, 2021

Not sure if this isn't an issue for click, because the version check is done in click/shell_completion.py. Please let me know if this is adressed wrong here.

@lwille
Copy link

lwille commented Oct 12, 2021

Sorry for not following up on this - I gave up at some point. Closed my draft PR.

@johntdyer
Copy link

I am running into the same issue on 0.9.4

@fharper
Copy link

fharper commented Mar 18, 2022

Same problem with 0.9.4 also.

@chenrui333
Copy link
Contributor Author

Any maintainer seeing this issue?

@cunderw
Copy link

cunderw commented May 8, 2022

Seeing the same issue here on macOS.

@ScottG489
Copy link

Running into this via pip install on Ubuntu 20.04 on version 0.9.4.

@fabaff
Copy link
Member

fabaff commented Sep 29, 2022

Should be fixed with #385

@fabaff fabaff closed this as completed Sep 29, 2022
@chenrui333
Copy link
Contributor Author

I am still seeing the similar error in the 0.9.6 build

  Error: Failure while executing; `\{\"SHELL\"=\>\"bash\"\} /opt/homebrew/Cellar/homeassistant-cli/0.9.6/bin/hass-cli completion bash` exited with 2. Here's the output:

build log, https://github.com/Homebrew/homebrew-core/actions/runs/3728798001/jobs/6324164107

@chenrui333
Copy link
Contributor Author

Also @fabaff, can you help with this pypi artifact issue as well?

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

No branches or pull requests

9 participants