-
Notifications
You must be signed in to change notification settings - Fork 4
/
z-a-rust.plugin.zsh
39 lines (29 loc) · 1.04 KB
/
z-a-rust.plugin.zsh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Copyright (c) 2019 Sebastian Gniazdowski
# License MIT
# According to the Zsh Plugin Standard:
# https://zdharma-continuum.github.io/Zsh-100-Commits-Club/Zsh-Plugin-Standard.html
0="${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}"
0="${${(M)0:#/*}:-$PWD/$0}"
autoload .za-rust-bin-or-src-function-body \
za-rust-atload-handler za-rust-atclone-handler \
za-rust-atpull-handler za-rust-help-handler \
za-rust-atdelete-handler
# An empty stub to fill the help handler fields
za-rust-help-null-handler() { :; }
@zinit-register-annex "zinit-annex-rust" \
hook:atload-40 \
za-rust-atload-handler \
za-rust-help-handler \
"rustup|cargo''" # also register new ices
@zinit-register-annex "zinit-annex-rust" \
hook:atclone-40 \
za-rust-atclone-handler \
za-rust-help-null-handler
@zinit-register-annex "zinit-annex-rust" \
hook:\%atpull-40 \
za-rust-atclone-handler \
za-rust-help-null-handler
@zinit-register-annex "zinit-annex-rust" \
hook:atdelete-40 \
za-rust-atdelete-handler \
za-rust-help-null-handler