mirror of
https://github.com/nix-community/home-manager.git
synced 2025-03-25 01:26:17 +00:00
kubecolor: add enableZshIntegration option for completion
This commit is contained in:
parent
5a6e5a59a4
commit
e94ec0a6cd
1 changed files with 6 additions and 0 deletions
|
@ -25,6 +25,9 @@ in {
|
|||
'';
|
||||
};
|
||||
|
||||
enableZshIntegration =
|
||||
lib.hm.shell.mkZshIntegrationOption { inherit config; };
|
||||
|
||||
settings = mkOption {
|
||||
type = yamlFormat.type;
|
||||
default = { };
|
||||
|
@ -90,5 +93,8 @@ in {
|
|||
home.shellAliases = lib.mkIf (cfg.enableAlias && (cfg.package != null)) {
|
||||
kubectl = lib.getExe cfg.package;
|
||||
};
|
||||
|
||||
programs.zsh.initContent =
|
||||
lib.mkIf cfg.enableZshIntegration "compdef kubecolor=kubectl";
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue