zsh: generalize zsh-history-substring-search

Specifically, allow variable expansion for the key codes by switching
from single to double quotes.

This also adds a helpful suggestion to descriptions. Taken from the
project's README, see

  4abed97b6e/README.md (L71-L74))
This commit is contained in:
Kiran Ostrolenk 2023-10-10 18:09:38 +01:00 committed by Robert Helgesson
parent a4a72ffd76
commit 9a2ce65697
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
2 changed files with 9 additions and 7 deletions

View file

@ -17,9 +17,9 @@ with lib;
# 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$"
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$"
'';
};
}