mricon / b4

Tool to help with email-based patch workflows
GNU General Public License v2.0
67 stars 24 forks source link

bash autocompletion #47

Open calebdw opened 2 weeks ago

calebdw commented 2 weeks ago

Hello!

I just came across this and I'm excited to try it out! However, one of the thinks that would be really useful is bash autocompletion for the various menu items.

Thanks!

blmaier commented 1 week ago

Hi Caleb,

Their is a script in the repo at ./misc/tc-generate.sh that can generate shell completions

calebdw commented 1 week ago

I'll check it out, thanks! However, most programs offer a completion command that outputs the shell completion for you to redirect wherever you want:

b4 completion <shell>
blmaier commented 1 week ago

The python library that b4 is using can support cli completion. When it was originally added it was decided not to have to avoid adding a new runtime dependency. I agree it would be nice to have, I manually install b4 from pypi which (as far as I know) can't include the completion scripts. See https://lore.kernel.org/tools/20240305-obedient-centipede-of-finesse-a35a86@lemur/

calebdw commented 1 week ago

I installed b4 through pypi as well so I don't have access to the ./misc/tc-generate.sh unless I clone the repo

blmaier commented 1 week ago

I sent a patch to the mailing list that attempts to support PyPi installs with pip install b4[completion]. https://lore.kernel.org/tools/20241009-pypi-completion-v1-1-94f50a157c56@collins.com/T/#u

calebdw commented 1 week ago

I added some comments