refactor(plugins): generate completion functions in the background

This commit is contained in:
Marc Cornellà
2021-12-28 14:30:13 +01:00
parent c06197ad95
commit 49bae43f62
5 changed files with 57 additions and 62 deletions

View File

@@ -7,7 +7,7 @@ print ${(%):-'Please update your .zshrc to use the `%Brust%b` plugin instead.%f'
0="${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}"
0="${${(M)0:#/*}:-$PWD/$0}"
# Remove old generated completion file
command rm -f "${0:A:h}/_rustup"
command rm -f "${0:A:h}/_rustup" "$ZSH_CACHE_DIR/rustup_version"
(( ${fpath[(Ie)$ZSH/plugins/rust]} )) || {
fpath=("$ZSH/plugins/rust" $fpath)