jandamm/zgenom

Please add details to the README with changes from stock zgen

unixorn opened this issue ยท 12 comments

I think it's great that you're doing work on a zgen fork (and have added it to the awesome-zsh-plugins list), but I'd like to see what updates you've made so I can consider replacing stock zgen with it in the zsh-quickstart-kit.

Thanks!

Thanks for adding it ๐Ÿ‘

Here is a quick list I've done so far:

  • compiling your sourced scripts
  • add zgen compile in case you want to recursively compile your dotfiles (manually)
  • add zgen bin to add an executable to your $PATH
  • lazy loading zgenom by sourcing zgenom.zsh instead of zgen.zsh
  • the default $ZGEN_DIR is where you cloned zgenom to (except when you have ~/.zgen for backwards compatibility)

It also merges some pull requests and fixes bugs:

  • compinit with custom flags wasn't working properly
  • update to ohmyzsh/ohmyzsh
  • allow cloning without submodules

This is all done with backwards compatibility in mind. So zgenom shouldn't require you to change anything of your existing zgen configuration. (Sourcing zgenom.zsh instead of zgen.zsh is recommended but not needed).
Please see the README as well. I'll plan to rewrite the readme but haven't gotten around to it yet.

Things I might add in the future: (somewhat depends on the acceptance and my personal need)

Hey @unixorn,
I've added this list to the readme.
Do you want me to add some more information?

I see the notes about zgen bin but not zgen compile, otherwise looks good

Added zgen compile. I'll do a rewrite of the readme when I get around to it.
For now everything should be covered ๐Ÿ‘

Sweet, thanks.

Please let me know how you decide with zsh-quickstart-kit.

Feel free to post here or create a new issue if there's something missing or you have another question ๐Ÿ‘

I did a talk on using the quickstart at work this week and didn't want to mess with it right before the talk. I'll give it a try this weekend, I'd rather be using zgenom since it's getting actively maintained.

Given that a lot of repos are moving to main instead of master, the repo checkout code probably needs a tweak to cope with that sooner rather than later.

My idea was to get the default branch name from GitHub instead of assuming a master or main.

Even better :-)

Now that I'm thinking about it, maybe just clone the repo without specifying a branch unless the user specifies it in the zgen load command. Won't that end up with the repo's default branch?

Then the code wouldn't have to change if the user specifies a bitbucket or other git server besides GH.

I've created an issue for that.

Exactly this was my idea. Then ideally on zgen update I check for those repositories if the default branch has changed and would start using the new branch. (After cloning you can ask a git remote for its head branch)

I didn't know you could query a remote for its head branch, neat!