mirror of
https://github.com/LnL7/nix-darwin.git
synced 2025-03-31 04:04:45 +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 {
|
programs.zsh.shellInit = mkOption {
|
||||||
|
type = types.lines;
|
||||||
default = "";
|
default = "";
|
||||||
description = ''
|
description = ''
|
||||||
Shell script code called during zsh shell initialisation.
|
Shell script code called during zsh shell initialisation.
|
||||||
'';
|
'';
|
||||||
type = types.lines;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.zsh.loginShellInit = mkOption {
|
programs.zsh.loginShellInit = mkOption {
|
||||||
|
type = types.lines;
|
||||||
default = "";
|
default = "";
|
||||||
description = ''
|
description = ''
|
||||||
Shell script code called during zsh login shell initialisation.
|
Shell script code called during zsh login shell initialisation.
|
||||||
'';
|
'';
|
||||||
type = types.lines;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.zsh.interactiveShellInit = mkOption {
|
programs.zsh.interactiveShellInit = mkOption {
|
||||||
|
type = types.lines;
|
||||||
default = "";
|
default = "";
|
||||||
description = ''
|
description = ''
|
||||||
Shell script code called during interactive zsh shell initialisation.
|
Shell script code called during interactive zsh shell initialisation.
|
||||||
'';
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.zsh.promptInit = mkOption {
|
||||||
type = types.lines;
|
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}
|
${config.system.build.setAliases}
|
||||||
|
|
||||||
${cfg.interactiveShellInit}
|
${cfg.interactiveShellInit}
|
||||||
|
|
||||||
|
${cfg.promptInit}
|
||||||
|
${optionalString cfg.enableCompletion "autoload -U compinit && compinit"}
|
||||||
|
|
||||||
${config.environment.extraInit}
|
${config.environment.extraInit}
|
||||||
|
|
||||||
# Read system-wide modifications.
|
# Read system-wide modifications.
|
||||||
|
|
Loading…
Add table
Reference in a new issue