mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-10-16 11:40:46 +00:00
Compare commits
4 commits
3907070e9a
...
8cf080c01d
Author | SHA1 | Date | |
---|---|---|---|
|
8cf080c01d | ||
|
9bcafe1c27 | ||
|
3151c9c1a3 | ||
|
88214ad9f7 |
5 changed files with 36 additions and 0 deletions
|
@ -57,6 +57,16 @@ function takeurl() {
|
|||
cd "$thedir"
|
||||
}
|
||||
|
||||
function takezip() {
|
||||
local data thedir
|
||||
data="$(mktemp)"
|
||||
curl -L "$1" > "$data"
|
||||
unzip "$data" -d "./"
|
||||
thedir="$(unzip -l "$data" | awk 'NR==4 {print $4}' | sed 's/\/.*//')"
|
||||
rm "$data"
|
||||
cd "$thedir"
|
||||
}
|
||||
|
||||
function takegit() {
|
||||
git clone "$1"
|
||||
cd "$(basename ${1%%.git})"
|
||||
|
@ -65,6 +75,8 @@ function takegit() {
|
|||
function take() {
|
||||
if [[ $1 =~ ^(https?|ftp).*\.(tar\.(gz|bz2|xz)|tgz)$ ]]; then
|
||||
takeurl "$1"
|
||||
elif [[ $1 =~ ^(https?|ftp).*\.(zip)$ ]]; then
|
||||
takezip "$1"
|
||||
elif [[ $1 =~ ^([A-Za-z0-9]\+@|https?|git|ssh|ftps?|rsync).*\.git/?$ ]]; then
|
||||
takegit "$1"
|
||||
else
|
||||
|
|
|
@ -73,6 +73,7 @@ plugins=(... git)
|
|||
| `gcans!` | `git commit --verbose --all --signoff --no-edit --amend` |
|
||||
| `gcann!` | `git commit --verbose --all --date=now --no-edit --amend` |
|
||||
| `gc!` | `git commit --verbose --amend` |
|
||||
| `gcn` | `git commit --verbose --no-edit` |
|
||||
| `gcn!` | `git commit --verbose --no-edit --amend` |
|
||||
| `gcs` | `git commit -S` |
|
||||
| `gcss` | `git commit -S -s` |
|
||||
|
|
|
@ -197,6 +197,7 @@ alias gcan!='git commit --verbose --all --no-edit --amend'
|
|||
alias gcans!='git commit --verbose --all --signoff --no-edit --amend'
|
||||
alias gcann!='git commit --verbose --all --date=now --no-edit --amend'
|
||||
alias gc!='git commit --verbose --amend'
|
||||
alias gcn='git commit --verbose --no-edit'
|
||||
alias gcn!='git commit --verbose --no-edit --amend'
|
||||
alias gcf='git config --list'
|
||||
alias gdct='git describe --tags $(git rev-list --tags --max-count=1)'
|
||||
|
|
14
plugins/sdkman/README.md
Normal file
14
plugins/sdkman/README.md
Normal file
|
@ -0,0 +1,14 @@
|
|||
# sdkman
|
||||
|
||||
Plugin for SDKMAN, a tool for managing parallel versions of multiple Software Development Kits on most Unix based systems.
|
||||
Provides initialization for different scenarios where users may have installed.
|
||||
|
||||
To use it, add `sdkman` to your plugins array in your zshrc file:
|
||||
|
||||
```zsh
|
||||
plugins=(... sdkman)
|
||||
```
|
||||
|
||||
## Requirements
|
||||
|
||||
* [SDKMAN](http://sdkman.io/)
|
8
plugins/sdkman/sdkman.plugin.zsh
Normal file
8
plugins/sdkman/sdkman.plugin.zsh
Normal file
|
@ -0,0 +1,8 @@
|
|||
if [[ -z "$SDKMAN_DIR" ]]; then
|
||||
if [[ -d "$HOME/.sdkman" ]]; then
|
||||
export SDKMAN_DIR="$HOME/.sdkman"
|
||||
else
|
||||
export SDKMAN_DIR="$(brew --prefix sdkman-cli)/libexec" || echo "Cannot find SDKMAN!"
|
||||
fi
|
||||
fi
|
||||
[[ -s "${SDKMAN_DIR}/bin/sdkman-init.sh" ]] && source "${SDKMAN_DIR}/bin/sdkman-init.sh"
|
Loading…
Reference in a new issue