-
Brandon Maier authored
Shell completion support was added in commit 333189c0 by using a shell script to generate the completion files with python-shtab. This script can be run by distribution packagers to include shell completion. However this does not support the use case of installing b4 with pip from PyPi[1], because PyPi doesn't support distributing shell completion scripts. Many tools support this by having a command line flag that can generate the completion scripts. In the original version of the shell completion by Emil Velikov this was supported with `b4 --print-completion bash`, but it was decided against to avoid bringing in more dependencies[2]. This restores Emil's work, but using a Python optional-dependency. This way the base install for b4 is unchanged, but PyPi users that want shell completion can install it with `pip install b4[completion]`. [1] https://github.com/mricon/b4/issues/47 [2] https://lore.kernel.org/tools/20240305-obedient-centipede-of-finesse-a35a86@lemur/ Signed-off-by:
Brandon Maier <brandon.maier@collins.com> Link: https://patch.msgid.link/20241009-pypi-completion-v1-1-94f50a157c56@collins.com Signed-off-by:
Konstantin Ryabitsev <konstantin@linuxfoundation.org>
13d5dc72Brandon Maier authoredShell completion support was added in commit 333189c0 by using a shell script to generate the completion files with python-shtab. This script can be run by distribution packagers to include shell completion. However this does not support the use case of installing b4 with pip from PyPi[1], because PyPi doesn't support distributing shell completion scripts. Many tools support this by having a command line flag that can generate the completion scripts. In the original version of the shell completion by Emil Velikov this was supported with `b4 --print-completion bash`, but it was decided against to avoid bringing in more dependencies[2]. This restores Emil's work, but using a Python optional-dependency. This way the base install for b4 is unchanged, but PyPi users that want shell completion can install it with `pip install b4[completion]`. [1] https://github.com/mricon/b4/issues/47 [2] https://lore.kernel.org/tools/20240305-obedient-centipede-of-finesse-a35a86@lemur/ Signed-off-by:
Brandon Maier <brandon.maier@collins.com> Link: https://patch.msgid.link/20241009-pypi-completion-v1-1-94f50a157c56@collins.com Signed-off-by:
Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Loading