Compare commits
No commits in common. "89c2d21b8d75048d29ea1528d33d3ee1ddbd86a1" and "e00c59e0666458d1a4aef42f691fc502622c44f8" have entirely different histories.
89c2d21b8d
...
e00c59e066
16
ZshPlug.zsh
16
ZshPlug.zsh
|
|
@ -54,13 +54,12 @@ fi
|
|||
## Load custom Plugin directory
|
||||
## Otherwise use default location
|
||||
export pluginDir=${ZSH_PLUG_pluginDir:-$HOME/.local/share/zsh}
|
||||
export plugins=${ZSH_PLUG_plugins}
|
||||
|
||||
########################
|
||||
# FUNCTION DEFINITIONS #
|
||||
########################
|
||||
|
||||
export githubPrefix="https://github.com/"
|
||||
|
||||
ZSH_PLUG_pluginTest() {
|
||||
## Test if a plugin is installed or not
|
||||
## RETURNS
|
||||
|
|
@ -122,24 +121,23 @@ Plug() {
|
|||
# test for git as needed to get plugins
|
||||
command -v git > /dev/null || { echo "Git is not installed" >&2 ; return 1; }
|
||||
|
||||
## No need to check if plugins has content since if there are no plugins this does not run anythinh
|
||||
|
||||
for Plugin in ${ZSH_PLUG_plugins[@]}; do
|
||||
## No need to check if plugins has content since if there are no plugins this does not run anything
|
||||
for Plugin in $ZSH_PLUG_Plugins; do
|
||||
echo "$Plugin"
|
||||
ZSH_PLUG_pluginTest "$Plugin"
|
||||
pluginTest "$Plugin"
|
||||
local exitcode="$?"
|
||||
case $exitcode in
|
||||
0)
|
||||
## plugin installed
|
||||
echo "Loading $Plugin"
|
||||
ZSH_PLUG_pluginLoad "$Plugin"
|
||||
pluginLoad "$Plugin"
|
||||
;;
|
||||
1)
|
||||
## plugin not installed
|
||||
echo "Installing $Plugin"
|
||||
ZSH_PLUG_pluginInstall "$Plugin"
|
||||
pluginInstall "$Plugin"
|
||||
echo "Loading $Plugin"
|
||||
ZSH_PLUG_pluginLoad "$Plugin"
|
||||
pluginLoad "$Plugin"
|
||||
;;
|
||||
4)
|
||||
## Too many args to pluginTest
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user