The documentation lists the ability to checkout a plugin from GitHub from a specific branch/commit:
# Example install of a plugin pinned to specifc commit or branch, just pass the git reference
plug "zsh-users/zsh-syntax-highlighting" "122dc46"
This ONLY works if the commit is on the master/main branch. If checking out a different branch by name, or a commit hash on a different branch this doesn't work.
Steps to reproduce
Add the following to your ~/.zshrc:
plug "zsh-users/zsh-autosuggestions" "develop"
and then source/open a new shell.
Expected behavior
Can use commit hashes and branches that are not on main/master
Screenshots and recordings
No response
OS / Linux distribution
Ubuntu 20.04
Zsh version
5.8
Zap version
release-v1/1.2.1
Terminal emulator
Gnome Terminal 3.36.2
If using WSL on Windows, which version of WSL
None
Additional context
This does not work because of the way git clone is performed...
The result is a local repo that contains the history of the master branch of the plugin, but no other branches are tracked. A fix is to make the following call before pulling with unshallow (see this StackOverflow).
Describe the bug
The documentation lists the ability to checkout a plugin from GitHub from a specific branch/commit:
This ONLY works if the commit is on the
master
/main
branch. If checking out a different branch by name, or a commit hash on a different branch this doesn't work.Steps to reproduce
Add the following to your
~/.zshrc
:and then source/open a new shell.
Expected behavior
Can use commit hashes and branches that are not on
main
/master
Screenshots and recordings
No response
OS / Linux distribution
Ubuntu 20.04
Zsh version
5.8
Zap version
release-v1/1.2.1
Terminal emulator
Gnome Terminal 3.36.2
If using WSL on Windows, which version of WSL
None
Additional context
This does not work because of the way git clone is performed...
unshallow
is used https://github.com/zap-zsh/zap/blob/aed067fe4a1732fe44e5cbf0f0b2b7f584023739/zap.zsh#L46The result is a local repo that contains the history of the
master
branch of the plugin, but no other branches are tracked. A fix is to make the following call before pulling with unshallow (see this StackOverflow).I will submit a PR to fix this issue