Open alfonz19 opened 1 year ago
Second, Bash completion doesn't work with Watson 2.1.0 for me. I have it in ~/.local/share/bash-completions/completions/watson
, and it used to work on the previous version.
I confirmed just now that the completion file hasn't changed in a few years, so I'm wondering if this is due to the recent click
version bump...
what is "click version bump?"
This is what I mean: https://github.com/TailorDev/Watson/commit/b2068f64600d53221270c864abd136ac0254ae2d.
click
is the library used for the CLI (easier to generate help text, autocompletion, etc).
I confirm this. Autocompletion doesn't work.
Tab completion is broken for me, too, though I'm fairly sure it was working until recently (and definitely after May 2022).
Same behavior in my environment. Would be great if I can use the autocomplete again in the future.
Confirmed that downgrading to td-watson==2.0.1
resolves the bash completion. A couple notes regarding this process
brew
only has the latest, so you have to resort to pip-install on a Macpip
still pulls click>8
by default, so I had to override that with the old spec click>=7.0,<8.0
which resulted in 7.1.2Confirmed that downgrading to
td-watson==2.0.1
resolves the bash completion. A couple notes regarding this process
brew
only has the latest, so you have to resort to pip-install on a Macpip
still pullsclick>8
by default, so I had to override that with the old specclick>=7.0,<8.0
which resulted in 7.1.2
Executed these two commands on my ubuntu to achieve downgrade of td-watson
and click
package, after which bash completion starts working:
1, pip install td-watson==2.0.1
pip install click==7.1.2
Bash completion works using this previous version of the 'watson.completion' file. Just put this file to /etc/bash_completion and it will work again with the latest (2.1.0) release.
In instalation text:
If you use a Bash-compatible shell, you can install the watson.completion file from the source distribution as /etc/bash.completion.d/watson - or wherever your distribution keeps the Bash completion configuration files. After you restart your shell, you can then just type watson on your command line and then hit TAB to see all available commands.
First
pip install --user td-watson
then ... file from source distribution? Where, what?Ok, so I went with development version, installed it, copied bash completion as instructed, I trying to debug why it's not working I just added logging:
and
restarted bash, and I see, that 'registered' appears in file as expected, but COMPREPLY is always logged as empty string. I'm no bash expert, but I cannot see in completion script neither any list of supported actions nor call to watson to get one.
what am I doing wrong?