From f8525abd96ac83b3a945a476089d38e05537d7c0 Mon Sep 17 00:00:00 2001 From: Keanu Date: Sun, 5 Sep 2021 19:27:26 +0200 Subject: [PATCH] [zsh] Generate Bitwarden CLI completions. --- zsh/plugins.zsh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/zsh/plugins.zsh b/zsh/plugins.zsh index 9d56fb2..09158bd 100755 --- a/zsh/plugins.zsh +++ b/zsh/plugins.zsh @@ -27,6 +27,16 @@ _plugin project 'https://git.sr.ht/~keanucode/scripts/blob/master/project/projec unset gh_comp_path fi; unset gh_bin + if bw_bin="$(command_locate bw)" && [[ -n "$bw_bin" ]]; then + bw_comp_path="${ZSH_CACHE_DIR}/site-functions/_bw" + if [[ "$bw_bin" -nt "$bw_comp_path" || ! -s "$bw_comp_path" ]]; then + _perf_timer_start "generate bw completions" + "$bw_bin" completion --shell zsh >| "$bw_comp_path" + _perf_timer_stop "generate bw completions" + fi + unset bw_comp_path + fi; unset bw_bin + _plugin nim-compl 'https://raw.githubusercontent.com/nim-lang/Nim/devel/tools/nim.zsh-completion' from=url \ after_load='plugin-cfg-path fpath prepend ""'