Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align releas-v1 to tag 1.1.4 #155

Merged
merged 4 commits into from
May 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 14 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,20 +83,15 @@ plug "$HOME/.config/zsh/aliases.zsh"
plug "$HOME/.config/zsh/exports.zsh"
```

By default `Zap` when installing a plugin will clone a GitHub repository using a HTTPS web URL, if you require to be able to install from a private GitHub or from a different git server (for example GitLab) you can provide a different URL prefix to be used. For example, using a password-protected SSH key:
By default `Zap` when installing a plugin will clone a GitHub repository using a HTTPS web URL, if you require to be able to install from a private GitHub or from a different git server (for example GitLab) you can provide a different URL prefix to be used. For example:

```zsh
# Your ZSHRC file
...

# Example globally set Zap to git clone using an SSH key
export ZAP_GIT_PREFIX='git@github.com:'
# Example globally seting the prefix for Zap to git clone using an SSH key
export ZAP_GIT_PREFIX="git@github.com:"
plug "zap-zsh/private-repo"

# Example git clone using GitLab for a single plugin
ZAP_GIT_PREFIX='https://gitlab.com/' plug "user/repo"

...
ZAP_GIT_PREFIX="https://gitlab.com/" plug "user/repo"
```

It is possible to call `plug` in any interactive shell session to source a file or to download and source a plugin for that particular session.
Expand Down Expand Up @@ -127,8 +122,16 @@ Zap provided commands for updating and cleaning up plugins

## Uninstall

To uninstall Zap, when currently active, execute the following:

```zsh
rm -rf "$ZAP_DIR"
```

When not currently active, execute the following:

```zsh
rm -rf ~/.local/share/zap
rm -rf "${XDG_DATA_HOME:-$HOME/.local/share}/zap"
```

## Notes
Expand All @@ -137,7 +140,7 @@ For sourcing local files use `$HOME` instead of `~` when giving a full path to t

---

[![zap thumbnail](https://user-images.githubusercontent.com/29136904/237558142-b6201b3f-bf85-4866-95f3-df275cc94759.png)](https://www.youtube.com/watch?v=LhDMw6n3GI4)
[![zap thumbnail](https://user-images.githubusercontent.com/29136904/238183118-943e3f25-5198-45a5-a22e-45a3a27db11d.png)](https://www.youtube.com/watch?v=LhDMw6n3GI4)

<!----------------------------------------------------------------------------->

Expand Down
5 changes: 4 additions & 1 deletion zap.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ function plug() {
git clone --depth 1 "${ZAP_GIT_PREFIX:-"https://github.com/"}${plugin}.git" "$plugin_dir" > /dev/null 2>&1 || { echo -e "\e[1A\e[K❌ Failed to clone $plugin_name"; return 12 }
echo -e "\e[1A\e[K⚡ Zap installed $plugin_name"
fi
[[ -n "$git_ref" ]] && { git -C "$plugin_dir" checkout "$git_ref" > /dev/null 2>&1 || { echo "❌ Failed to checkout $git_ref"; return 13 }}
[[ -n "$git_ref" ]] && {
git -C "$plugin_dir" pull --unshallow > /dev/null 2>&1
git -C "$plugin_dir" checkout "$git_ref" > /dev/null 2>&1 || { echo "❌ Failed to checkout $git_ref"; return 13 }
}
_try_source && { ZAP_INSTALLED_PLUGINS+="$plugin_name" && return 0 } || echo "❌ $plugin_name not activated" && return 1
}

Expand Down