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
Shell completion is sorely missed from this tool; other NixOS tooling has it, whether it is manually written out-of-tree a la https://github.com/nix-community/nix-zsh-completions, or inside the repo, or something else.
This will help quite a lot with discoverability for new users, and just for ease of use. No one wants to memorize generation numbers or run nixos generation list first to see what generation to switch to, that's just annoying. Completions will help with this matter.
Instead of building these completions manually for each shell (there's a lot of commands and options, after all!), we should attempt to implement this in the Nix way, where possible completions for a command are returned on stdout after invoking the actual command itself in completion mode (using an env var like NIXOS_CLI_COMPLETION_INDEX or something like that), and go from there. This will allow us to reuse logic between the command itself and completions, without reimplementing it for each shell that requests it.
Help
Yes
Issues
I have checked existing issues and there are no existing ones with the same request.
The text was updated successfully, but these errors were encountered:
This will be worked on during the rewrite; cobra has stellar support for command-line completions, so it's easy enough to work on during the rewrite effort.
Feature Description
Shell completion is sorely missed from this tool; other NixOS tooling has it, whether it is manually written out-of-tree a la https://github.com/nix-community/nix-zsh-completions, or inside the repo, or something else.
This will help quite a lot with discoverability for new users, and just for ease of use. No one wants to memorize generation numbers or run
nixos generation list
first to see what generation to switch to, that's just annoying. Completions will help with this matter.Instead of building these completions manually for each shell (there's a lot of commands and options, after all!), we should attempt to implement this in the Nix way, where possible completions for a command are returned on
stdout
after invoking the actual command itself in completion mode (using an env var likeNIXOS_CLI_COMPLETION_INDEX
or something like that), and go from there. This will allow us to reuse logic between the command itself and completions, without reimplementing it for each shell that requests it.Help
Yes
Issues
The text was updated successfully, but these errors were encountered: