1
0
Fork 0
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:
Jennings Zhang 2025-03-14 11:48:01 -04:00 committed by Austin Horstman
parent 5a6e5a59a4
commit e94ec0a6cd

View file

@ -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";
};
}