zsh: add history.ignorePatterns option (#1933)
The corresponding variable is `HISTORY_IGNORE` described in zshparam(1).
This commit is contained in:
parent
19fc0917c0
commit
5709b5f953
3 changed files with 33 additions and 0 deletions
|
|
@ -4,5 +4,6 @@
|
|||
zsh-history-path-new-custom = ./history-path-new-custom.nix;
|
||||
zsh-history-path-old-default = ./history-path-old-default.nix;
|
||||
zsh-history-path-old-custom = ./history-path-old-custom.nix;
|
||||
zsh-history-ignore-pattern = ./history-ignore-pattern.nix;
|
||||
zsh-prezto = ./prezto.nix;
|
||||
}
|
||||
|
|
|
|||
21
tests/modules/programs/zsh/history-ignore-pattern.nix
Normal file
21
tests/modules/programs/zsh/history-ignore-pattern.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
{
|
||||
imports = [
|
||||
({ ... }: { config.programs.zsh.history.ignorePatterns = [ "echo *" ]; })
|
||||
({ ... }: { config.programs.zsh.history.ignorePatterns = [ "rm *" ]; })
|
||||
];
|
||||
|
||||
config = {
|
||||
programs.zsh.enable = true;
|
||||
|
||||
nixpkgs.overlays =
|
||||
[ (self: super: { zsh = pkgs.writeScriptBin "dummy-zsh" ""; }) ];
|
||||
|
||||
nmt.script = ''
|
||||
assertFileContains home-files/.zshrc "HISTORY_IGNORE='(echo *|rm *)'"
|
||||
'';
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue