jujutsu: remove shell completion
Completion is installed by the jujutsu package itself, making this additional setup redundant. https://github.com/nix-community/home-manager/pull/5016#issuecomment-1947449541 https://github.com/nix-community/home-manager/pull/5037#pullrequestreview-1888843990
This commit is contained in:
parent
a54e05bc12
commit
517601b37c
|
@ -10,6 +10,12 @@ let
|
|||
in {
|
||||
meta.maintainers = [ maintainers.shikanime ];
|
||||
|
||||
imports = let
|
||||
mkRemovedShellIntegration = name:
|
||||
mkRemovedOptionModule [ "programs" "jujutsu" "enable${name}Integration" ]
|
||||
"This option is no longer necessary.";
|
||||
in map mkRemovedShellIntegration [ "Bash" "Fish" "Zsh" ];
|
||||
|
||||
options.programs.jujutsu = {
|
||||
enable =
|
||||
mkEnableOption "a Git-compatible DVCS that is both simple and powerful";
|
||||
|
@ -33,24 +39,6 @@ in {
|
|||
for options.
|
||||
'';
|
||||
};
|
||||
|
||||
enableBashIntegration = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "Whether to enable Bash integration.";
|
||||
};
|
||||
|
||||
enableZshIntegration = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "Whether to enable Zsh integration.";
|
||||
};
|
||||
|
||||
enableFishIntegration = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "Whether to enable Fish integration.";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
@ -59,18 +47,5 @@ in {
|
|||
home.file.".jjconfig.toml" = mkIf (cfg.settings != { }) {
|
||||
source = tomlFormat.generate "jujutsu-config" cfg.settings;
|
||||
};
|
||||
|
||||
programs.bash.initExtra = mkIf cfg.enableBashIntegration ''
|
||||
source <(${pkgs.jujutsu}/bin/jj util completion)
|
||||
'';
|
||||
|
||||
programs.zsh.initExtra = mkIf cfg.enableZshIntegration ''
|
||||
source <(${pkgs.jujutsu}/bin/jj util completion --zsh)
|
||||
compdef _jj ${pkgs.jujutsu}/bin/jj
|
||||
'';
|
||||
|
||||
programs.fish.interactiveShellInit = mkIf cfg.enableFishIntegration ''
|
||||
${pkgs.jujutsu}/bin/jj util completion --fish | source
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue