1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2025-03-28 02:37:09 +00:00

add prompt and completion options for programs.zsh

This commit is contained in:
Daiderd Jordan 2016-12-16 15:44:07 +01:00
parent 345941b4d8
commit 731920e5af
No known key found for this signature in database
GPG key ID: D02435D05B810C96

View file

@ -37,27 +37,43 @@ in
};
programs.zsh.shellInit = mkOption {
type = types.lines;
default = "";
description = ''
Shell script code called during zsh shell initialisation.
'';
type = types.lines;
};
programs.zsh.loginShellInit = mkOption {
type = types.lines;
default = "";
description = ''
Shell script code called during zsh login shell initialisation.
'';
type = types.lines;
};
programs.zsh.interactiveShellInit = mkOption {
type = types.lines;
default = "";
description = ''
Shell script code called during interactive zsh shell initialisation.
'';
};
programs.zsh.promptInit = mkOption {
type = types.lines;
default = "autoload -U promptinit && promptinit && prompt walters";
description = ''
Shell script code used to initialise the zsh prompt.
'';
};
programs.zsh.enableCompletion = mkOption {
type = types.bool;
default = true;
description = ''
Enable zsh completion for all interactive zsh shells.
'';
};
};
@ -117,6 +133,10 @@ in
${config.system.build.setAliases}
${cfg.interactiveShellInit}
${cfg.promptInit}
${optionalString cfg.enableCompletion "autoload -U compinit && compinit"}
${config.environment.extraInit}
# Read system-wide modifications.