mirror of
https://github.com/tweag/gomod2nix.git
synced 2024-11-09 20:19: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) ''
|
postInstall = lib.optionalString (stdenv.buildPlatform == stdenv.targetPlatform) ''
|
||||||
$out/bin/gomod2nix completion bash > gomod2nix.bash
|
installShellCompletion --cmd gomod2nix \
|
||||||
$out/bin/gomod2nix completion fish > gomod2nix.fish
|
--bash <($out/bin/gomod2nix completion bash) \
|
||||||
$out/bin/gomod2nix completion zsh > _gomod2nix
|
--fish <($out/bin/gomod2nix completion fish) \
|
||||||
installShellCompletion gomod2nix.{bash,fish} _gomod2nix
|
--zsh <($out/bin/gomod2nix completion zsh)
|
||||||
'' + ''
|
'' + ''
|
||||||
wrapProgram $out/bin/gomod2nix --prefix PATH : ${lib.makeBinPath [ go ]}
|
wrapProgram $out/bin/gomod2nix --prefix PATH : ${lib.makeBinPath [ go ]}
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Reference in a new issue