From cd6fccd6782880f5c5ebb3b79934c8e5fa1cf32b Mon Sep 17 00:00:00 2001 From: Christian Chiarulli Date: Sun, 14 May 2023 07:23:10 -0400 Subject: [PATCH 1/3] docs: make it more obvious the image is a video link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 51a0321..ce08eb2 100644 --- a/README.md +++ b/README.md @@ -137,7 +137,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) From 500b414f79a8b4c19dc8e2fe85561808c50c6b98 Mon Sep 17 00:00:00 2001 From: Matthew Winter <33818+wintermi@users.noreply.github.com> Date: Mon, 15 May 2023 00:17:36 +1000 Subject: [PATCH 2/3] feat: update README (#150) * feat: update README * fix: update README with the new video thumbnail * fix: update README with updated uninstall text --- README.md | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index ce08eb2..eee5f47 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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 From ee622852ef56dccc05263e968271ec878d00f23a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ant=C3=B3nio=20Peixe?= Date: Mon, 15 May 2023 08:56:15 +0100 Subject: [PATCH 3/3] fix: unshallow clone for plugin checkout (#153) * fix: unshallow clone for plugin checkout fixes #151 * refactor: address PR comments --- zap.zsh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zap.zsh b/zap.zsh index 5ee2f85..78effd3 100644 --- a/zap.zsh +++ b/zap.zsh @@ -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 }