mirror of
https://github.com/tweag/gomod2nix.git
synced 2024-11-05 01:59:08 +00:00
Generate shell completions using process substitution
Practically this makes no difference but it's slightly more elegant.
This commit is contained in:
parent
704aa9566a
commit
055777bf88
1 changed files with 4 additions and 4 deletions
|
@ -28,10 +28,10 @@ buildGoApplication {
|
|||
};
|
||||
|
||||
postInstall = lib.optionalString (stdenv.buildPlatform == stdenv.targetPlatform) ''
|
||||
$out/bin/gomod2nix completion bash > gomod2nix.bash
|
||||
$out/bin/gomod2nix completion fish > gomod2nix.fish
|
||||
$out/bin/gomod2nix completion zsh > _gomod2nix
|
||||
installShellCompletion gomod2nix.{bash,fish} _gomod2nix
|
||||
installShellCompletion --cmd gomod2nix \
|
||||
--bash <($out/bin/gomod2nix completion bash) \
|
||||
--fish <($out/bin/gomod2nix completion fish) \
|
||||
--zsh <($out/bin/gomod2nix completion zsh)
|
||||
'' + ''
|
||||
wrapProgram $out/bin/gomod2nix --prefix PATH : ${lib.makeBinPath [ go ]}
|
||||
'';
|
||||
|
|
Loading…
Reference in a new issue