mirror of
https://github.com/keanuplayz/dotfiles.git
synced 2024-08-15 02:33:12 +00:00
[zsh] remove useless unset
from zplg
This commit is contained in:
parent
7c351c2f22
commit
a26517f50c
1 changed files with 12 additions and 2 deletions
14
zsh/zplg.zsh
14
zsh/zplg.zsh
|
@ -146,7 +146,7 @@ _zplg_load() {
|
||||||
|
|
||||||
_zplg_source_git_download() {
|
_zplg_source_git_download() {
|
||||||
local plugin_url="$1" plugin_dir="$2"
|
local plugin_url="$1" plugin_dir="$2"
|
||||||
git clone --depth=1 --recurse-submodules -- "$plugin_url" "$plugin_dir"
|
git clone --recurse-submodules -- "$plugin_url" "$plugin_dir"
|
||||||
}
|
}
|
||||||
|
|
||||||
_zplg_source_git_upgrade() {
|
_zplg_source_git_upgrade() {
|
||||||
|
@ -154,6 +154,17 @@ _zplg_load() {
|
||||||
( cd "$plugin_dir" && git pull && git submodule update --init --recursive )
|
( cd "$plugin_dir" && git pull && git submodule update --init --recursive )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# small helper for the git source
|
||||||
|
plugin-git-checkout-latest-version() {
|
||||||
|
local latest_tag
|
||||||
|
git tag --list --sort -version:refname | read -r latest_tag
|
||||||
|
if (( ${#tags} == 0 )); then
|
||||||
|
_zplg_error "$0: no tags in the Git repository"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
# git checkout
|
||||||
|
}
|
||||||
|
|
||||||
_zplg_source_github_download() {
|
_zplg_source_github_download() {
|
||||||
local plugin_url="$1" plugin_dir="$2"
|
local plugin_url="$1" plugin_dir="$2"
|
||||||
_zplg_source_git_download "https://github.com/$plugin_url.git" "$plugin_dir"
|
_zplg_source_git_download "https://github.com/$plugin_url.git" "$plugin_dir"
|
||||||
|
@ -343,7 +354,6 @@ plugin() {
|
||||||
# extra ${...} is needed to turn array into a string by joining it with
|
# extra ${...} is needed to turn array into a string by joining it with
|
||||||
# spaces
|
# spaces
|
||||||
ZPLG_LOADED_PLUGIN_BUILD_CMDS[$plugin_id]="${${(@q)plugin_build}}"
|
ZPLG_LOADED_PLUGIN_BUILD_CMDS[$plugin_id]="${${(@q)plugin_build}}"
|
||||||
unset plugin_build_quoted
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
} always {
|
} always {
|
||||||
|
|
Loading…
Reference in a new issue