diff options
author | Nikita Uvarov <uv.nikita@gmail.com> | 2019-10-28 11:11:44 +0100 |
---|---|---|
committer | Robert Helgesson <robert@rycee.net> | 2019-11-05 23:04:06 +0100 |
commit | 450571056552c9311fcb2894328696b535265593 (patch) | |
tree | 1e998fe3d050c54d8caabb3f9df2a020edfd6c4f /tests/modules/programs/zsh/history-path-old-custom.nix | |
parent | 05dabb7239254c0d9b2f314d7aa73923917bd1cd (diff) |
zsh: fix history.path issues
- Default value is set to static '$HOME/.zsh_history' -- dotDir is not
prepended anymore
- $HOME is not prepended to the option value
- Ensure history path directory exists
Fixes #886, replaces #427.
Diffstat (limited to 'tests/modules/programs/zsh/history-path-old-custom.nix')
-rw-r--r-- | tests/modules/programs/zsh/history-path-old-custom.nix | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/modules/programs/zsh/history-path-old-custom.nix b/tests/modules/programs/zsh/history-path-old-custom.nix new file mode 100644 index 00000000000..672ccc81002 --- /dev/null +++ b/tests/modules/programs/zsh/history-path-old-custom.nix @@ -0,0 +1,23 @@ +{ config, lib, pkgs, ... }: + +with lib; + +{ + config = { + home.stateVersion = "19.09"; + programs.zsh = { + enable = true; + history.path = "some/directory/zsh_history"; + }; + + nixpkgs.overlays = [ + (self: super: { + zsh = pkgs.writeScriptBin "dummy-zsh" ""; + }) + ]; + + nmt.script = '' + assertFileRegex home-files/.zshrc '^HISTFILE="$HOME/some/directory/zsh_history"$' + ''; + }; +} |