mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-20 03:02:29 +01:00
use a shorter plugin name
This commit is contained in:
parent
d67d3d4d0c
commit
5c97e28d56
6 changed files with 0 additions and 0 deletions
22
plugins/omz-bootstrap/lib/download.zsh
Normal file
22
plugins/omz-bootstrap/lib/download.zsh
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
_clone_git() {
|
||||
local url=$1
|
||||
local folder=$2
|
||||
if [[ ! -d "$folder" ]]; then
|
||||
git clone $url $folder
|
||||
fi
|
||||
}
|
||||
|
||||
_download_plugin() {
|
||||
[[ "$#" != 2 ]] && return 1
|
||||
local url=$1; local name=$2;
|
||||
_clone_git $url $ZSH_CUSTOM/plugins/$name
|
||||
_map_put plugins $name enabled
|
||||
}
|
||||
|
||||
_download_theme() {
|
||||
[[ "$#" != 2 ]] && return 1
|
||||
local url=$1; local theme=$2;
|
||||
_clone_git $url $ZSH_CUSTOM/themes/$theme
|
||||
ln -s $ZSH_CUSTOM/themes/$theme/$theme.zsh-theme $ZSH_CUSTOM/$theme.zsh-theme
|
||||
_map_put themes theme $theme
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue