···74 shopt -u globstar
75 '';
7677- 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- '';
00008384 passthru = {
85 tests = {
···74 shopt -u globstar
75 '';
7677+ 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+ '';
8788 passthru = {
89 tests = {