mirror of
https://github.com/zplug/zplug
synced 2024-09-20 19:02:08 +02:00
commit
9819d039cf
47
base/sources/gitlab.zsh
Normal file
47
base/sources/gitlab.zsh
Normal file
@ -0,0 +1,47 @@
|
||||
__zplug::sources::gitlab::check()
|
||||
{
|
||||
__zplug::sources::github::check "$argv[@]"
|
||||
}
|
||||
|
||||
__zplug::sources::gitlab::install()
|
||||
{
|
||||
__zplug::sources::github::install "$argv[@]"
|
||||
}
|
||||
|
||||
__zplug::sources::gitlab::update()
|
||||
{
|
||||
__zplug::sources::github::update "$argv[@]"
|
||||
}
|
||||
|
||||
__zplug::sources::gitlab::get_url()
|
||||
{
|
||||
local repo="$1" url_format
|
||||
|
||||
case "$ZPLUG_PROTOCOL" in
|
||||
HTTPS | https)
|
||||
# https://git::@gitlab.com/%s.git
|
||||
url_format="https://git::@gitlab.com/${repo}.git"
|
||||
;;
|
||||
SSH | ssh)
|
||||
# git@gitlab.com:%s.git
|
||||
url_format="git@gitlab.com:${repo}.git"
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "$url_format"
|
||||
}
|
||||
|
||||
__zplug::sources::gitlab::load_plugin()
|
||||
{
|
||||
__zplug::sources::github::load_plugin "$argv[@]"
|
||||
}
|
||||
|
||||
__zplug::sources::gitlab::load_command()
|
||||
{
|
||||
__zplug::sources::github::load_command "$argv[@]"
|
||||
}
|
||||
|
||||
__zplug::sources::gitlab::load_theme()
|
||||
{
|
||||
__zplug::sources::github::load_theme "$argv[@]"
|
||||
}
|
@ -4,6 +4,7 @@ If there is a service/framework you want to install from that's not supported
|
||||
by zplug (yet!), you can add your own. We call these "sources."
|
||||
[GitHub](https://github.com), [Bitbucket](https://bitbucket.org), [GitHub
|
||||
Gist](https://gist.github.com), GitHub releases,
|
||||
[Gitlab](https://gitlab.com),
|
||||
[oh-my-zsh](https://github.com/robbyrussell/oh-my-zsh), and
|
||||
[prezto](https://github.com/sorin-ionescu/prezto) are supported by default.
|
||||
Sources are what you specify with the `from` tag (e.g. `from:bitbucket`), so
|
||||
|
@ -53,7 +53,8 @@ Can manage everything
|
||||
.IP \(bu 2.3
|
||||
.\}
|
||||
Zsh plugins/UNIX commands on
|
||||
GitHub
|
||||
GitHub,
|
||||
Gitlab
|
||||
and
|
||||
Bitbucket
|
||||
.RE
|
||||
@ -380,7 +381,7 @@ T}:T{
|
||||
Specify the service from which you install
|
||||
T}:T{
|
||||
.sp
|
||||
github,bitbucket,gh\-r,gist, oh\-my\-zsh,prezto,local (github)
|
||||
github,gitlab,bitbucket,gh\-r,gist, oh\-my\-zsh,prezto,local (github)
|
||||
T}:T{
|
||||
.sp
|
||||
from:gh\-r
|
||||
@ -764,6 +765,11 @@ zplug "b4b4r07/hello_bitbucket", \e
|
||||
hook\-build:"chmod 755 *\&.sh", \e
|
||||
use:"*\&.sh"
|
||||
|
||||
# Support Gitlab
|
||||
zplug "willemmali-sh/chegit", \e
|
||||
as:command, \e
|
||||
from:gitlab
|
||||
|
||||
# Group dependencies, emoji\-cli depends on jq in this example
|
||||
zplug "stedolan/jq", \e
|
||||
as:command, \e
|
||||
|
@ -50,7 +50,7 @@ T}
|
||||
lt lt.
|
||||
T{
|
||||
.sp
|
||||
github, bitbucket, gh\-r, gist, oh\-my\-zsh, local
|
||||
github, gitlab, bitbucket, gh\-r, gist, oh\-my\-zsh, local
|
||||
T}:T{
|
||||
.sp
|
||||
github
|
||||
|
@ -23,10 +23,10 @@ will be installed as the plugin or as the command.
|
||||
|
||||
.zplug from tag
|
||||
[options="header"]
|
||||
|================================================================
|
||||
| Possive Values | Default value
|
||||
| github, bitbucket, gh-r, gist, oh-my-zsh, local | github
|
||||
|================================================================
|
||||
|=========================================================================
|
||||
| Possive Values | Default value
|
||||
| github, gitlab, bitbucket, gh-r, gist, oh-my-zsh, local | github
|
||||
|=========================================================================
|
||||
|
||||
Besides, by using `zstyle` command, you can change default value:
|
||||
|
||||
|
@ -26,7 +26,7 @@ Unlike antigen, zplug requires no ZSH plugin file (`*.plugin.zsh`).
|
||||
It's such a fantabulous piece of software.
|
||||
|
||||
* Can manage everything
|
||||
** Zsh plugins/UNIX commands on https://github.com[GitHub]
|
||||
** Zsh plugins/UNIX commands on https://github.com[GitHub], https://gitlab.com[Gitlab],
|
||||
and https://bitbucket.org[Bitbucket]
|
||||
** Gist file (https://gist.github.com[gist.github.com])
|
||||
** Third-party sources e.g.,
|
||||
@ -123,7 +123,7 @@ and so on. If you want to use extended glob, see later section for setting the z
|
||||
`use:"*darwin*"`
|
||||
|
||||
|*from* | Specify the service from which you install
|
||||
| `github`,`bitbucket`,`gh-r`,`gist`,
|
||||
| `github`, `gitlab`,`bitbucket`,`gh-r`,`gist`,
|
||||
`oh-my-zsh`,`prezto`,`local` (`github`) | `from:gh-r`
|
||||
|
||||
|*at* | Branch, tag, or commit to use | *revision* (`master`) | `at:v1.5.6`
|
||||
@ -338,6 +338,11 @@ zplug "b4b4r07/hello_bitbucket", \
|
||||
hook-build:"chmod 755 *.sh", \
|
||||
use:"*.sh"
|
||||
|
||||
# Support Gitlab
|
||||
zplug "willemmali-sh/chegit", \
|
||||
as:command, \
|
||||
from:gitlab
|
||||
|
||||
# Group dependencies, emoji-cli depends on jq in this example
|
||||
zplug "stedolan/jq", \
|
||||
as:command, \
|
||||
|
@ -110,7 +110,7 @@ case "$words[1]" in
|
||||
_values -S : -s , "zplug tags" \
|
||||
"as[$_zplug_tags[as]]:as:(plugin command theme)" \
|
||||
"use[$_zplug_tags[use]]:use:->use" \
|
||||
"from[$_zplug_tags[from]]:from:(gh-r gist oh-my-zsh github bitbucket local)" \
|
||||
"from[$_zplug_tags[from]]:from:(gh-r gist oh-my-zsh github gitlab bitbucket local)" \
|
||||
"at[$_zplug_tags[at]]:at:" \
|
||||
"rename-to[$_zplug_tags[rename-to]]:rename-to:" \
|
||||
"dir[$_zplug_tags[dir]]:dir:->dir" \
|
||||
|
Loading…
Reference in New Issue
Block a user