-
Notifications
You must be signed in to change notification settings - Fork 3
/
z-a-default-ice.plugin.zsh
43 lines (33 loc) · 1.42 KB
/
z-a-default-ice.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
39
40
41
42
43
# -*- mode: sh; sh-indentation: 4; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
# Copyright (c) 2020 Sebastian Gniazdowski
# According to the Zsh Plugin Standard:
# https://zdharma-continuum.github.io/Zsh-100-Commits-Club/Zsh-Plugin-Standard.html#zero-handling
0="${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}"
0="${${(M)0:#/*}:-$PWD/$0}"
# Standard hash for plugins:
# https://zdharma-continuum.github.io/Zsh-100-Commits-Club/Zsh-Plugin-Standard.html#std-hash
typeset -gA Plugins
Plugins[DEFAULT_ICE_DIR]="${0:h}"
autoload -Uz za-default-ice-preinit-handler \
za-default-ice-main-cmd-help-handler \
za-default-ice-main-cmd \
.za-default-ice-show-default-ices \
.za-default-ice-stats
# An empty stub to fill the help handler fields
za-default-ice-help-null-handler() { :; }
# The unscoping-support hook.
@zinit-register-annex "zinit-annex-default-ice" \
hook:preinit-3 \
za-default-ice-preinit-handler \
za-default-ice-help-null-handler
# The subcommand `meta'.
@zinit-register-annex "zinit-annex-default-ice" \
subcommand:default-ice \
za-default-ice-main-cmd \
za-default-ice-main-cmd-help-handler
(( Plugins[DEFAULT_ICE_stats:existing-ices] = 0 ))
(( Plugins[DEFAULT_ICE_stats:executions] = 0 ))
(( Plugins[DEFAULT_ICE_stats:applied-ices] = 0 ))
(( Plugins[DEFAULT_ICE_stats:type-snippet] = 0 ))
(( Plugins[DEFAULT_ICE_stats:type-plugin] = 0 ))
# vim:ft=zsh:tw=80:sw=4:sts=4:et:foldmarker=[[[,]]]