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:
parent
345941b4d8
commit
731920e5af
1 changed files with 22 additions and 2 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Reference in a new issue