New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nixos/pazi: init #60324
nixos/pazi: init #60324
Conversation
mentioned in the NixOS#60303 PR
I would prefer to see thing slike |
Oh yeah calling |
yes get rid of the module, other programs provide completion without the module, some package paths are already looked for by the shell ($out/share/zsh/site-functions/ for zsh for instance). |
I'm a bit confused about zsh. Is site-functions only for completion? Are aliases considered completion too? I think I saw that files related to completion should be named with an underscore prefix. Not sure if I need |
I gave up on site-functions and bash-completion since I think they are used to load "on demand" autocompletion stuff. While in this case the shell files are used to set an alias and other stuff. I changed nixos/modules/programs/pazi.nix to include the generated shell scripts. I don't know if I should or could do it in the modules. I put them in I tested bash, zsh and fish and they seems to work fine. |
@infinisil friendly reminder for the review. I can open a new PR if this one is too confusing. |
|
||
programs.bash.interactiveShellInit = "source ${pkgs.pazi}/share/pazi.bash"; | ||
programs.fish.interactiveShellInit = "source ${pkgs.pazi}/share/pazi.fish"; | ||
programs.zsh.interactiveShellInit = "source ${pkgs.pazi}/share/pazi.zsh"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd much rather have some conventions for where to put stuff that should be auto-sourced. Then people could just do systemPackages = [ pkgs.pazi ]
and their shell would load it because pazi.* appears in some /run/current-system/sw/share/* path. This would then also work for nix-env
and on non-NixOS systems.
@infinisil I agree. |
Motivation for this change
Shell integration.
@teto
Things done
I'm still running
nixos-build
but the module seems pretty simple. I'll update after testing.I manually tested that eval works for bash and zsh. And
pazi init fish | source
for fish.sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)