bitwarden-cli: add zsh completion (#408749)

authored by dotlambda and committed by GitHub 5c68d925 c10873a4

+10 -6
+10 -6
pkgs/by-name/bi/bitwarden-cli/package.nix
··· 74 74 shopt -u globstar 75 75 ''; 76 76 77 - postInstall = '' 78 - # The @bitwarden modules are actually npm workspaces inside the source tree, which 79 - # leave dangling symlinks behind. They can be safely removed, because their source is 80 - # bundled via webpack and thus not needed at run-time. 81 - rm -rf $out/lib/node_modules/@bitwarden/clients/node_modules/{@bitwarden,.bin} 82 - ''; 77 + postInstall = 78 + '' 79 + # The @bitwarden modules are actually npm workspaces inside the source tree, which 80 + # leave dangling symlinks behind. They can be safely removed, because their source is 81 + # bundled via webpack and thus not needed at run-time. 82 + rm -rf $out/lib/node_modules/@bitwarden/clients/node_modules/{@bitwarden,.bin} 83 + '' 84 + + lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) '' 85 + installShellCompletion --cmd bw --zsh <($out/bin/bw completion --shell zsh) 86 + ''; 83 87 84 88 passthru = { 85 89 tests = {