2021-10-07 04:43:09 +08:00
|
|
|
print ${(%):-'%F{yellow}The `rustup` plugin is deprecated and has been moved to the `rust` plugin.'}
|
|
|
|
print ${(%):-'Please update your .zshrc to use the `%Brust%b` plugin instead.%f'}
|
2021-09-16 00:41:44 +08:00
|
|
|
|
2021-12-19 04:53:49 +08:00
|
|
|
# TODO: 2021-12-28: remove this block
|
|
|
|
# Handle $0 according to the standard:
|
2021-12-28 21:16:54 +08:00
|
|
|
# https://zdharma-continuum.github.io/Zsh-100-Commits-Club/Zsh-Plugin-Standard.html
|
2021-12-19 04:53:49 +08:00
|
|
|
0="${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}"
|
|
|
|
0="${${(M)0:#/*}:-$PWD/$0}"
|
2021-11-07 00:45:51 +08:00
|
|
|
# Remove old generated completion file
|
2021-12-28 21:30:13 +08:00
|
|
|
command rm -f "${0:A:h}/_rustup" "$ZSH_CACHE_DIR/rustup_version"
|
2021-09-16 00:18:25 +08:00
|
|
|
|
2021-10-07 04:43:09 +08:00
|
|
|
(( ${fpath[(Ie)$ZSH/plugins/rust]} )) || {
|
|
|
|
fpath=("$ZSH/plugins/rust" $fpath)
|
|
|
|
source "$ZSH/plugins/rust/rust.plugin.zsh"
|
|
|
|
}
|