未验证 提交 3ebd9b84 编写于 作者: R Rishikesh Darandale 提交者: GitHub

plugins: added nvm and sdkman (#150)

* feat(plugins): added sdkman plugin

* feat(plugins): added nvm plugin

* fix: fixed the codacy issues
上级 48df2df7
# nvm plugin
This plugin automatically source nvm[1]
## Installation
### Install nvm
Lets install[2] the nvm without updaing shell config!
```bash
export NVM_DIR="$HOME/.nvm" && (
git clone https://github.com/nvm-sh/nvm.git "$NVM_DIR"
cd "$NVM_DIR"
git checkout `git describe --abbrev=0 --tags --match "v[0-9]*" $(git rev-list --tags --max-count=1)`
) && \. "$NVM_DIR/nvm.sh"
```
### Include nvm as plugin
```bash
plugins=(
git
nvm
)
```
## nvm completion configuration
```bash
completions=(
git
composer
ssh
nvm
)
```
[1]: https://github.com/nvm-sh/nvm
[2]: https://github.com/nvm-sh/nvm#manual-install
#!/usr/bin/env bash
# Set NVM_DIR if it isn't already defined
[[ -z "$NVM_DIR" ]] && export NVM_DIR="$HOME/.nvm"
# Try to load nvm only if command not already available
if ! type "nvm" &> /dev/null; then
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
# This is done as part of completions!!!
# [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
fi
# sdkman plugin
This plugin automatically source sdkman[1]
## Installation
### Install sdkman
Lets install[2] the sdkman without updaing shell config!
```bash
$ curl -s "https://get.sdkman.io?rcupdate=false" | bash
```
### Include sdkman as plugin
```bash
plugins=(
git
sdkman
)
```
[1]: https://sdkman.io/
[2]: https://sdkman.io/install
#!/usr/bin/env bash
# Set NVM_DIR if it isn't already defined
[[ -z "$SDKMAN_DIR" ]] && export NVM_DIR="$HOME/.sdkman"
# Try to load sdk only if command not already available
if ! type "sdk" &> /dev/null; then
[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh"
fi
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册