Problem
It's not immediately obvious where the llm-cmd-comp.{bash,zsh,fish} files are after installing the plugin. We can dig for them, but given the variety of ways llm can be installed, this may be tricky.
Alternatively, we can copy and paste the file contents from the repo, but that runs into the issue of never being updated if the plugin changes.
Proposed solution
llm cmdcomp should be able to output the necessary shell integration codes.
Many programs that integrate with shells do this already. E.g. from my .zshrc and .bashrc files:
source <(COMPLETE=zsh jj)
eval "$(uv generate-shell-completion zsh)"
eval "$(mise activate bash)"
eval "$(direnv hook bash)"
eval "$(starship init bash)"
eval "$(zoxide init bash)"
It could be similar to those, e.g., llm cmdcomp --init zsh or llm cmdcomp --hook bash.
Problem
It's not immediately obvious where the
llm-cmd-comp.{bash,zsh,fish}files are after installing the plugin. We can dig for them, but given the variety of ways llm can be installed, this may be tricky.Alternatively, we can copy and paste the file contents from the repo, but that runs into the issue of never being updated if the plugin changes.
Proposed solution
llm cmdcompshould be able to output the necessary shell integration codes.Many programs that integrate with shells do this already. E.g. from my .zshrc and .bashrc files:
It could be similar to those, e.g.,
llm cmdcomp --init zshorllm cmdcomp --hook bash.