forked from zpm-zsh/zpm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzpm.zsh
36 lines (31 loc) · 1.18 KB
/
zpm.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
#!/usr/bin/env zsh
# Zsh Plugin Standard compatibility
# 0 – the plugin manager provides the ZERO parameter,
# f - … supports the functions subdirectory,
# b - … supports the bin subdirectory,
# u - … the unload function,
# U - … the @zsh-plugin-run-on-unload call,
# p – … the @zsh-plugin-run-on-update call,
# i – … the zsh_loaded_plugins activity indicator,
# P – … the ZPFX global parameter,
# s – … the PMSPEC global parameter itself (i.e.: should be always present).
export PMSPEC="0fbPs"
export ZPFX="${HOME}/.local"
export _ZPM_DIR="${${(%):-%x}:h}"
export _ZPM_PLUGIN_DIR="${_ZPM_DIR}/plugins"
export ZSH_CACHE_DIR="${TMPDIR:-/tmp}/zsh-${UID:-user}"
_ZPM_CACHE="${ZSH_CACHE_DIR}/zpm-cache.zsh"
_ZPM_CACHE_ASYNC="${ZSH_CACHE_DIR}/zpm-cache-async.zsh"
_ZPM_COMPDUMP="${ZSH_CACHE_DIR}/zcompdump"
fpath=("${_ZPM_DIR}/functions" "${ZSH_CACHE_DIR}/functions" $fpath)
export PATH="${ZSH_CACHE_DIR}/bin:$PATH"
typeset -aU path cdpath fpath manpath
setopt caseglob
autoload -Uz compinit
zstyle ':completion:*:zpm:*' sort false
if [[ -f "${_ZPM_CACHE}" ]]; then
source "${_ZPM_CACHE}"
else
eval "$(<${_ZPM_DIR}/lib/init.zsh)"
eval "$(<${_ZPM_DIR}/lib/imperative.zsh)"
fi