jj-pre-push: fix shell completion generation (#575097)

This commit is contained in:
xanderio
2026-10-28 14:52:16 +00:00
committed by GitHub

View File

@@ -40,6 +40,9 @@ python3Packages.buildPythonApplication (finalAttrs: {
nativeBuildInputs = [ installShellFiles ];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
# Generate completions for the requested shell instead of detecting the build shell.
export _TYPER_COMPLETE_TEST_DISABLE_SHELL_DETECTION=1
installShellCompletion --cmd jj-pre-push \
--bash <($out/bin/jj-pre-push --show-completion bash) \
--fish <($out/bin/jj-pre-push --show-completion fish) \