bws: install completions

This commit is contained in:
Mario Rodas 2024-04-06 04:20:00 +00:00
parent 95974f051c
commit 6ecf48c936
1 changed files with 9 additions and 0 deletions

View File

@ -1,6 +1,7 @@
{ lib
, rustPlatform
, fetchFromGitHub
, installShellFiles
, pkg-config
, oniguruma
, openssl
@ -29,6 +30,7 @@ rustPlatform.buildRustPackage rec {
};
nativeBuildInputs = [
installShellFiles
pkg-config
] ++ lib.optionals stdenv.isLinux [
perl
@ -51,6 +53,13 @@ rustPlatform.buildRustPackage rec {
buildAndTestSubdir = "crates/bws";
postInstall = ''
installShellCompletion --cmd bws \
--bash <($out/bin/bws completions bash) \
--fish <($out/bin/bws completions fish) \
--zsh <($out/bin/bws completions zsh)
'';
meta = {
changelog = "https://github.com/bitwarden/sdk/blob/${src.rev}/CHANGELOG.md";
description = "Bitwarden Secrets Manager CLI";