home-manager/tests/modules/programs/zsh/history-substring-search.nix
Thiago Kenji Okada fcc4259cdb
treewide: stub tests (#6275)
* ranger: stub tests

* alacritty: stub tests

* broot: stub tests

* zsh: stub tests

* vim-vint: stub tests
2025-01-08 16:24:04 +01:00

23 lines
643 B
Nix

{ ... }:
{
imports = [ ./zsh-stubs.nix ];
config = {
programs.zsh = {
enable = true;
historySubstringSearch = {
enable = true;
searchDownKey = "^[[B";
searchUpKey = [ "^[[A" "\\eOA" ];
};
};
# Written with regex to ensure we don't end up missing newlines in the future
nmt.script = ''
assertFileRegex home-files/.zshrc "^bindkey \"\^\[\[B\" history-substring-search-down$"
assertFileRegex home-files/.zshrc "^bindkey \"\^\[\[A\" history-substring-search-up$"
assertFileRegex home-files/.zshrc "^bindkey \"\\\\eOA\" history-substring-search-up$"
'';
};
}