Commit 661e35b96d14

Vincent Demeester <vincent@sbr.pm>
2019-06-27 19:23:19
profiles.zsh: add zsh-history-substring-search
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent 4021834
Changed files (1)
modules
profiles
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