Merge pull request #294455 from pedorich-n/ast-grep-completions

ast-grep: install shell completions

authored by Sandro and committed by GitHub 010e1d59 c38616a7

+10
+10
pkgs/by-name/as/ast-grep/package.nix
··· 2 2 , rustPlatform 3 3 , fetchFromGitHub 4 4 , stdenv 5 + , installShellFiles 5 6 }: 6 7 7 8 rustPlatform.buildRustPackage rec { ··· 22 23 NIX_LDFLAGS = "-l${stdenv.cc.libcxx.cxxabi.libName}"; 23 24 }; 24 25 26 + nativeBuildInputs = [ installShellFiles ]; 27 + 25 28 # error: linker `aarch64-linux-gnu-gcc` not found 26 29 postPatch = '' 27 30 rm .cargo/config.toml 31 + ''; 32 + 33 + postInstall = '' 34 + installShellCompletion --cmd sg \ 35 + --bash <($out/bin/sg completions bash) \ 36 + --fish <($out/bin/sg completions fish) \ 37 + --zsh <($out/bin/sg completions zsh) 28 38 ''; 29 39 30 40 checkFlags = [