Added fpath plugin function
This commit is contained in:
parent
4e4df90013
commit
2fee7601c3
1 changed files with 8 additions and 0 deletions
|
|
@ -11,3 +11,11 @@ function zsh_add_plugin() {
|
||||||
zsh_add_config "plugins/$PLUGIN_NAME/$PLUGIN_NAME.plugin.zsh"
|
zsh_add_config "plugins/$PLUGIN_NAME/$PLUGIN_NAME.plugin.zsh"
|
||||||
zsh_add_config "plugins/$PLUGIN_NAME/$PLUGIN_NAME.zsh"
|
zsh_add_config "plugins/$PLUGIN_NAME/$PLUGIN_NAME.zsh"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function zsh_fpath_plugin() {
|
||||||
|
PLUGIN_NAME=$(echo $1 | cut -d"/" -f2)
|
||||||
|
if ! [ -d "$ZSH_CONFIG/plugins/$PLUGIN_NAME" ]; then
|
||||||
|
git clone "https://github.com/$1.git" "$ZSH_CONFIG/plugins/$PLUGIN_NAME"
|
||||||
|
fi
|
||||||
|
fpath+=($ZSH_CONFIG/plugins/$PLUGIN_NAME)
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue