Closed ShubhamVerma1811 closed 9 months ago
The reason that the binary outputs dynamically generated completions is to make sure the version of the completion setting matches the version of the actual binary. If we save the actual completion codes in the Oh-My-Bash (OMB) repository, the version mismatch between chezmoi
used to generate the completion file and chezmoi
in the user's environment causes an issue. At least, the PR should look similar to PR #404, where chezmoi completion bash
is dynamically called to obtain the completion setting matching the version of the actual binary.
On the other hand, bash-completion
currently tries to create a database of dynamically generated completions:
chezmoi
doesn't seem to be registered there, but you can in principle register it to bash-completion
so the chezmoi
completion is automatically loaded by bash-completion
without specifying anything at the OMB side. Note that OMB automatically loads bash-completion
when it detects bash-completion
.
Thank you for the feedback @akinomyoga, I got your point and made the necessary changes
Thanks for updating the PR. I am not now preparing a PR at bash-completion including chezmoi
and other commands with dynamic completion settings.
Could you check the lint error at New: Chezmoi aliases and completions. · ohmybash/oh-my-bash@9b4082b?
made the change, hopefully it passes
Thanks for updating the PR. I am not preparing a PR at bash-completion including
chezmoi
and other commands with dynamic completion settings.
Sorry, this is a typo of "I am now preparing a PR at bash-completion
".
Opened a PR at bash-completion: https://github.com/scop/bash-completion/pull/1048
Opened a PR at bash-completion: scop/bash-completion#1048
https://github.com/scop/bash-completion/pull/1048 has been merged.
Thank you for your quick responses and updates! I've merged it.
Hey there, This PR adds the support for custom Chezmoi aliases and completion.
The completions code is straight from the output of the
chezmoi completion bash
command.Do let me know for any changes.
cc: @twpayne