Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
zsh-history: Add module and tests #75622
Motivation for this change
Adds a module to configure the
Umm, there's an issue here. We don't want to proliferate single modules like this one because; all it does is install a zsh plugin and source it in your shell. This is exactly what zsh plugin managers were created for. There is one other, but I'm not fond of this https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/programs/zsh/zsh-autoenv.nix. It would make more sense if you could use just nix for this even. Home-manager has a functionality for this https://github.com/rycee/home-manager/blob/master/modules/programs/zsh.nix#L258, but I believe it makes much more sense there. This is because it can be scoped per user, and not the global shell. But I'm not opposed to that in nixos.
And about the test, it does make verifying the function easy.
A pure way could maybe be done with https://github.com/google/goexpect, but I don't code go.