diff options
| author | Daiderd Jordan <daiderd@gmail.com> | 2016-12-16 15:44:07 +0100 |
|---|---|---|
| committer | Daiderd Jordan <daiderd@gmail.com> | 2016-12-16 15:47:34 +0100 |
| commit | 731920e5afb8deaf47293f6144347ec784d88c28 (patch) | |
| tree | bb37b25a4fc5ba61294445e0f09555f784f53aa1 /modules/programs | |
| parent | 345941b4d8e982e3f0b29537875a337bacc993e6 (diff) | |
add prompt and completion options for programs.zsh
Diffstat (limited to 'modules/programs')
| -rw-r--r-- | modules/programs/zsh.nix | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/modules/programs/zsh.nix b/modules/programs/zsh.nix index 8da81db..32dfd8f 100644 --- a/modules/programs/zsh.nix +++ b/modules/programs/zsh.nix @@ -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. |
