flavours: install shell completions using process substitution

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
This commit is contained in:
Gabriel Fontes 2021-06-29 22:41:31 -03:00 committed by Jonathan Ringer
parent 93c6f425a4
commit 18f93edb9d

View file

@ -19,10 +19,10 @@ rustPlatform.buildRustPackage rec {
nativeBuildInputs = [ installShellFiles ];
postInstall = ''
$out/bin/flavours --completions bash > flavours.bash
$out/bin/flavours --completions fish > flavours.fish
$out/bin/flavours --completions zsh > _flavours
installShellCompletion --zsh _flavours --fish flavours.fish --bash flavours.bash
installShellCompletion --cmd flavours \
--zsh <($out/bin/flavours --completions zsh) \
--fish <($out/bin/flavours --completions fish) \
--bash <($out/bin/flavours --completions bash)
'';
meta = with lib; {