diff options
author | Connor Brewster <cbrewster@hey.com> | 2023-02-23 12:16:40 -0600 |
---|---|---|
committer | Connor Brewster <cbrewster@hey.com> | 2023-02-23 12:16:40 -0600 |
commit | 4816e023d1a9894707c9b192e1874135c8842582 (patch) | |
tree | ac87f8914002841fea401cb320ac7e1529c21381 /pkgs/tools/system/nsc | |
parent | 7ce8e7c4cf90492a631e96bcfe70724104914381 (diff) |
nsc: add shell completion
Diffstat (limited to 'pkgs/tools/system/nsc')
-rw-r--r-- | pkgs/tools/system/nsc/default.nix | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/pkgs/tools/system/nsc/default.nix b/pkgs/tools/system/nsc/default.nix index 69f16d65c576f..ef56a9ea1d6b4 100644 --- a/pkgs/tools/system/nsc/default.nix +++ b/pkgs/tools/system/nsc/default.nix @@ -2,6 +2,7 @@ , stdenv , buildGoModule , fetchFromGitHub +, installShellFiles }: buildGoModule rec { @@ -24,6 +25,15 @@ buildGoModule rec { vendorHash = "sha256-gDwppx0ORG+pXzTdGtUVbiFyTD/P7avt+/V89Gl0QYY="; + nativeBuildInputs = [ installShellFiles ]; + + postInstall = '' + installShellCompletion --cmd nsc \ + --bash <($out/bin/nsc completion bash) \ + --fish <($out/bin/nsc completion fish) \ + --zsh <($out/bin/nsc completion zsh) + ''; + preCheck = '' # Tests attempt to write to the home directory. export HOME=$(mktemp -d) |