2.home-manager/tests/modules/programs/zsh/default.nix
Kristopher James Kent (kjkent) 9fca491587 zsh: improve histfile handling
Previously, a stateVersion check for 20.03 determined whether or not the input to
`programs.zsh.history.path` would be prepended with `$HOME`. However, this was not
communicated in the documentation, which stated the version check determined whether
the default histfile location would be in `programs.zsh.dotDir` or
`home.homeDirectory`.

The current change simplifies matters and brings path handling in-line with that of
the preceding work on dotDir path handling. If a relative path is provided, it is
parsed as being relative to `home.homeDirectory`. Both absolute and relative paths
are supported, and are cleaned before being passed to other functions.

Tests have been rewritten for the new logic, with case handling for reusability.

Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
2025-07-25 13:15:29 -05:00

18 lines
813 B
Nix

{
zsh-abbr = ./zsh-abbr.nix;
zsh-aliases = ./aliases.nix;
zsh-dotdir-absolute = import ./dotdir.nix "absolute";
zsh-dotdir-default = import ./dotdir.nix "default";
zsh-dotdir-relative = import ./dotdir.nix "relative";
zsh-history-ignore-pattern = ./history-ignore-pattern.nix;
zsh-history-path-absolute = import ./history-path.nix "absolute";
zsh-history-path-default = import ./history-path.nix "default";
zsh-history-path-relative = import ./history-path.nix "relative";
zsh-history-substring-search = ./history-substring-search.nix;
zsh-plugins = ./plugins.nix;
zsh-prezto = ./prezto.nix;
zsh-session-variables = ./session-variables.nix;
zsh-syntax-highlighting = ./syntax-highlighting.nix;
zsh-zprof = ./zprof.nix;
zshrc-contents-priorities = ./zshrc-content-priorities.nix;
}