mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-12 01:59:37 +08:00
kubecolor: add enableZshIntegration option for completion
This commit is contained in:
committed by
Austin Horstman
parent
5a6e5a59a4
commit
e94ec0a6cd
@@ -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";
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user