Merge pull request #278755 from DamienCassou/hledger-add-bash-completion

Hledger: add bash completion
This commit is contained in:
Damien Cassou 2024-01-09 15:40:25 +00:00 committed by GitHub
commit 27d177bd1b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -229,11 +229,7 @@ self: super: builtins.intersectAttrs super {
# hledger* overrides
inherit (
let
# Copy hledger man pages from the source tarball into the proper place.
# It always contains the relevant man page(s) at the top level. For
# hledger it additionally has all the other man pages in embeddedfiles/
# which we ignore.
installHledgerManPages = overrideCabal (drv: {
installHledgerExtraFiles = overrideCabal (drv: {
buildTools = drv.buildTools or [] ++ [
pkgs.buildPackages.installShellFiles
];
@ -243,6 +239,10 @@ self: super: builtins.intersectAttrs super {
done
install -v -Dm644 *.info* -t "$out/share/info/"
if [ -e shell-completion/hledger-completion.bash ]; then
installShellCompletion --name hledger shell-completion/hledger-completion.bash
fi
'';
});
@ -254,15 +254,15 @@ self: super: builtins.intersectAttrs super {
});
in
{
hledger = installHledgerManPages super.hledger;
hledger-web = installHledgerManPages (hledgerWebTestFix super.hledger-web);
hledger-ui = installHledgerManPages super.hledger-ui;
hledger = installHledgerExtraFiles super.hledger;
hledger-web = installHledgerExtraFiles (hledgerWebTestFix super.hledger-web);
hledger-ui = installHledgerExtraFiles super.hledger-ui;
hledger_1_30_1 = installHledgerManPages
hledger_1_30_1 = installHledgerExtraFiles
(doDistribute (super.hledger_1_30_1.override {
hledger-lib = self.hledger-lib_1_30;
}));
hledger-web_1_30 = installHledgerManPages (hledgerWebTestFix
hledger-web_1_30 = installHledgerExtraFiles (hledgerWebTestFix
(doDistribute (super.hledger-web_1_30.override {
hledger = self.hledger_1_30_1;
hledger-lib = self.hledger-lib_1_30;