1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2025-02-18 14:15:08 +01:00
home-manager/tests/modules/programs/zsh/history-substring-search.nix

18 lines
553 B
Nix
Raw Permalink Normal View History

{
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$"
'';
}