mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-20 00:53:12 +03:00
nsc: add shell completion
This commit is contained in:
parent
7ce8e7c4cf
commit
4816e023d1
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user