mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 08:53:21 +00:00
git-spice: install shell completions for bash, zsh, and fish (#350351)
This commit is contained in:
commit
a703e590a4
@ -5,6 +5,7 @@
|
||||
fetchFromGitHub,
|
||||
git,
|
||||
nix-update-script,
|
||||
installShellFiles,
|
||||
}:
|
||||
|
||||
buildGo123Module rec {
|
||||
@ -22,6 +23,8 @@ buildGo123Module rec {
|
||||
|
||||
subPackages = [ "." ];
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
nativeCheckInputs = [ git ];
|
||||
|
||||
buildInputs = [ git ];
|
||||
@ -40,6 +43,13 @@ buildGo123Module rec {
|
||||
rm testdata/script/branch_submit_multiple_pr_templates.txt
|
||||
'';
|
||||
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
||||
installShellCompletion --cmd gs \
|
||||
--bash <($out/bin/gs shell completion bash) \
|
||||
--zsh <($out/bin/gs shell completion zsh) \
|
||||
--fish <($out/bin/gs shell completion fish)
|
||||
'';
|
||||
|
||||
passthru.updateScript = nix-update-script { };
|
||||
|
||||
meta = {
|
||||
|
Loading…
Reference in New Issue
Block a user