Unverified Commit f4220f11 authored by Gergő Gutyina's avatar Gergő Gutyina Committed by GitHub
Browse files

delve: add shell completion files (#501421)

parents 5832d416 6b4efeca
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -4,6 +4,7 @@
  fetchFromGitHub,
  stdenv,
  nix-update-script,
  installShellFiles,
}:

buildGoModule (finalAttrs: {
@@ -23,6 +24,8 @@ buildGoModule (finalAttrs: {

  vendorHash = null;

  nativeBuildInputs = [ installShellFiles ];

  subPackages = [ "cmd/dlv" ];

  ldflags = [
@@ -48,6 +51,11 @@ buildGoModule (finalAttrs: {
    # add symlink for vscode golang extension
    # https://github.com/golang/vscode-go/blob/master/docs/debugging.md#manually-installing-dlv-dap
    ln $out/bin/dlv $out/bin/dlv-dap

    installShellCompletion --cmd dlv \
      --bash <($out/bin/dlv completion bash) \
      --fish <($out/bin/dlv completion fish) \
      --zsh <($out/bin/dlv completion zsh)
  '';

  # delve doesn't support --version