Closed chenrui333 closed 2 years ago
It's came up for the NixOS packages as well.
The completion needs to be ported to work with click
> 8.0.
I ran into this just now when I installed via pip on Pop_OS 20.10
I tried the fix from https://github.com/home-assistant-ecosystem/home-assistant-cli/pull/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:~ #
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.
Sorry for not following up on this - I gave up at some point. Closed my draft PR.
I am running into the same issue on 0.9.4
Same problem with 0.9.4 also.
Any maintainer seeing this issue?
Seeing the same issue here on macOS.
Running into this via pip install on Ubuntu 20.04 on version 0.9.4.
Should be fixed with #385
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
Also @fabaff, can you help with this pypi artifact issue as well?
relates to Homebrew/homebrew-core#79691