Commit 0200335e authored by Yechiel Worenklein's avatar Yechiel Worenklein
Browse files

bitwarden-cli: add zsh completion

parent 69428d2c
Loading
Loading
Loading
Loading
+10 −6
Original line number Diff line number Diff line
@@ -74,11 +74,15 @@ buildNpmPackage rec {
    shopt -u globstar
  '';

  postInstall = ''
  postInstall =
    ''
      # The @bitwarden modules are actually npm workspaces inside the source tree, which
      # leave dangling symlinks behind. They can be safely removed, because their source is
      # bundled via webpack and thus not needed at run-time.
      rm -rf $out/lib/node_modules/@bitwarden/clients/node_modules/{@bitwarden,.bin}
    ''
    + lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
      installShellCompletion --cmd bw --zsh <($out/bin/bw completion --shell zsh)
    '';

  passthru = {