tilt: add completions (#374349)

This commit is contained in:
Arne Keller
2025-03-17 22:40:07 +01:00
committed by GitHub
+11
View File
@@ -4,6 +4,8 @@
src,
version,
tilt-assets,
stdenv,
installShellFiles,
}:
buildGoModule rec {
@@ -21,6 +23,15 @@ buildGoModule rec {
ldflags = [ "-X main.version=${version}" ];
nativeBuildInputs = [ installShellFiles ];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd tilt \
--bash <($out/bin/tilt completion bash) \
--fish <($out/bin/tilt completion fish) \
--zsh <($out/bin/tilt completion zsh)
'';
preBuild = ''
mkdir -p pkg/assets/build
cp -r ${tilt-assets}/* pkg/assets/build/