all repos — nixfiles @ 018c4cbf631cb86b765c6ef40dd33c94105d5e0a

System and user configuration, managed by nix and home-manager

zsh: optimise startup - compile init file - pre-generate and compile compinit dump (zcompdump)

Alan Pearce
commit

018c4cbf631cb86b765c6ef40dd33c94105d5e0a

parent

d820aae57b976d2fa935f48f18ac905ca0d5179e

1 file changed, 3 insertions(+), 0 deletions(-)

jump to
M user/settings/zsh.nixuser/settings/zsh.nix
@@ -4,6 +4,7 @@ let
inherit (pkgs) stdenv; lsOptions = if stdenv.isDarwin then "-p" else "-v --group-directories-first"; lsIsoDate = if stdenv.isDarwin then "" else "--time-style=long-iso"; + zshrc = ".config/zsh/.zshrc"; mkZshPlugin = attrs: { name = attrs.name; src = stdenv.mkDerivation {
@@ -254,4 +255,6 @@ source ${pkgs.fzf}/share/fzf/key-bindings.zsh
'' + builtins.readFile ../zsh/.config/zsh/.zshrc; }; + + home.file."${zshrc}".onChange = "${pkgs.zsh}/bin/zsh -i -c 'autoload -Uz compinit && compinit && zcompile ${zshrc}'"; }