nixos/git: add prompt.enable
This commit is contained in:
committed by
Maciej Krüger
parent
b2063364e1
commit
2db2f446c2
@@ -58,6 +58,10 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
prompt = {
|
||||
enable = mkEnableOption "automatically sourcing git-prompt.sh. This does not change $PS1; it simply provides relevant utility functions";
|
||||
};
|
||||
|
||||
lfs = {
|
||||
enable = mkEnableOption (lib.mdDoc "git-lfs");
|
||||
|
||||
@@ -89,6 +93,11 @@ in
|
||||
};
|
||||
};
|
||||
})
|
||||
(mkIf (cfg.enable && cfg.prompt.enable) {
|
||||
environment.interactiveShellInit = ''
|
||||
source ${cfg.package}/share/bash-completion/completions/git-prompt.sh
|
||||
'';
|
||||
})
|
||||
];
|
||||
|
||||
meta.maintainers = with maintainers; [ figsoda ];
|
||||
|
||||
Reference in New Issue
Block a user