mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-13 21:25:30 +03:00
nixos/git: add prompt.enable
This commit is contained in:
parent
b2063364e1
commit
2db2f446c2
1 changed files with 9 additions and 0 deletions
|
@ -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 = {
|
lfs = {
|
||||||
enable = mkEnableOption (lib.mdDoc "git-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 ];
|
meta.maintainers = with maintainers; [ figsoda ];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue