You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue concerns pixi, but also the wider conda ecosystem.
I would like to come up with a mechanism to support shell completion files easily.
Shell completions are usually initialized by sourcing a shell script that injects a number of completion functions into the context of the shell.
Homebrew has a pretty solid mechanism to generate & source shell completions and I think we should follow that. Conda also has the "activation" script mechanism, but it is meant for a slightly different purpose and it's also beneficial to not execute shell completion hooks in a context where it's not needed (to keep activation scripts fast).
For these reasons I would like to introduce a new folder $PREFIX/share/<shell>/completions/.
Of course, packages would have to adopt this folder (which is why we should also write a CEP about it).
For bash, zsh or fish, we should create snippets to load all the completions scripts from the folder. And pixi shell should automatically source this snippet.
For pixi global, we should source all relevant snippets (similar to the binary expose function) we should write the completions to be sourced to a file like ~/.pixi/completions/bash/completions.sh. This file would need be kept in sync with any changes.
The text was updated successfully, but these errors were encountered:
for pixi global i feel it might be a bit more stable to write the completions to ~/.pixi/completions/bash/<env-name>.sh and just source all of them in ~/.pixi/completions/bash-completion.sh
This issue concerns pixi, but also the wider conda ecosystem.
I would like to come up with a mechanism to support shell completion files easily.
Shell completions are usually initialized by sourcing a shell script that injects a number of completion functions into the context of the shell.
Homebrew has a pretty solid mechanism to generate & source shell completions and I think we should follow that. Conda also has the "activation" script mechanism, but it is meant for a slightly different purpose and it's also beneficial to not execute shell completion hooks in a context where it's not needed (to keep activation scripts fast).
For these reasons I would like to introduce a new folder
$PREFIX/share/<shell>/completions/
.Of course, packages would have to adopt this folder (which is why we should also write a CEP about it).
For bash, zsh or fish, we should create snippets to load all the completions scripts from the folder. And
pixi shell
should automatically source this snippet.For
pixi global
, we should source all relevant snippets (similar to the binary expose function) we should write the completions to be sourced to a file like~/.pixi/completions/bash/completions.sh
. This file would need be kept in sync with any changes.The text was updated successfully, but these errors were encountered: