From a3d5e8c4b2d28bd6e3290f5a3b6b305a500cdb84 Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Fri, 16 Oct 2026 22:43:14 -0400 Subject: [PATCH] jj-pre-push: fix shell completion generation Disable Typer shell autodetection so explicit shell arguments are used. This fixes darwin builds. It also fixes fish and zsh completions on linux where autodetection resulted in bash completions for all shells. --- pkgs/by-name/jj/jj-pre-push/package.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/by-name/jj/jj-pre-push/package.nix b/pkgs/by-name/jj/jj-pre-push/package.nix index 827117002602..10856878706a 100644 --- a/pkgs/by-name/jj/jj-pre-push/package.nix +++ b/pkgs/by-name/jj/jj-pre-push/package.nix @@ -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) \