commit 661e35b96d1408ca3af29fd569600ed04ca07c85
parent 40218342bfa2a454d016b4622f291b3f84ac067c
Author: Vincent Demeester <vincent@sbr.pm>
Date: Thu, 27 Jun 2019 19:23:19 +0200
profiles.zsh: add zsh-history-substring-search
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
Diffstat:
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/modules/profiles/zsh.nix b/modules/profiles/zsh.nix
@@ -37,7 +37,6 @@ in
shellAliases = import ./aliases.shell.nix;
plugins = [
{
- # will source emoji-cli.plugin.zsh
name = "emoji-cli";
src = pkgs.fetchFromGitHub {
owner = "b4b4r07";
@@ -46,6 +45,15 @@ in
sha256 = "0n88w4k5vaz1iyikpmlzdrrkxmfn91x5s4q405k1fxargr1w6bmx";
};
}
+ {
+ name = "zsh-history-substring-search";
+ src = pkgs.fetchFromGitHub {
+ owner = "zsh-users";
+ repo = "zsh-history-substring-search";
+ rev = "0f80b8eb3368b46e5e573c1d91ae69eb095db3fb";
+ sha256 = "0y8va5kc2ram38hbk2cibkk64ffrabfv1sh4xm7pjspsba9n5p1y";
+ };
+ }
];
initExtra = ''
if [ -e /home/vincent/.nix-profile/etc/profile.d/nix.sh ]; then . /home/vincent/.nix-profile/etc/profile.d/nix.sh; fi
@@ -54,6 +62,9 @@ in
select-word-style bash
# syntax highlighting
source ${pkgs.zsh-syntax-highlighting}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
+ # history-substring-search
+ bindkey '^[[A' history-substring-search-up
+ bindkey '^[[B' history-substring-search-down
'';
profileExtra = ''
if [ -e /home/vincent/.nix-profile/etc/profile.d/nix.sh ]; then . /home/vincent/.nix-profile/etc/profile.d/nix.sh; fi