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

zgen-update fails after latest update #110

Open
jnunderwood opened this issue Nov 12, 2018 · 3 comments
Open

zgen-update fails after latest update #110

jnunderwood opened this issue Nov 12, 2018 · 3 comments

Comments

@jnunderwood
Copy link

jnunderwood commented Nov 12, 2018

After the latest update, zgen-update fails with this error message:

-- zgen: Updating '/home/junderwo/.zgen/(^.git)/*' ...
zgen-update:cd:3: no such file or directory: /home/junderwo/.zgen/(^.git)/*
-- zgen: Deleting `/home/junderwo/.zgen/init.zsh` ...

I think it may be in function zgen-update(), on line 218 of zgen.zsh, in commit 5999d9e from pull request #95 that caused this.

Old code that works:

    for repo in "${ZGEN_DIR}"/*/*; do

New code that may be broken:

    for repo in "${ZGEN_DIR}"/(^.git)/*; do
@sukramblak
Copy link

sukramblak commented Nov 22, 2018

I can confirm this problem.

I'm a bit puzzled what the (^.git) is meant to do?

^.git would mean match anything but .git but what are the () for ? In addition in my install there is not $HOME/.zgen/.git directory.

After using the following function manually i got a lot of updates but the "no match found" is still there!

zgen-update-old () {
    for repo in "${ZGEN_DIR}"/*/*
    do
	-zgpute "Updating '${repo}' ..."
	(
	    cd "${repo}" && git pull && git submodule update --init --recursive
	)
    done
                               zgen-reset
}
 

@sukramblak
Copy link

Hi

i figured it out myself after running zgen selfupdate it pulled updates for zgen and worked again. This is explained in the commit msg.

 commit f0034837e3044192991213ee708c67dfa6182f8f
 Author: David Pärsson <[email protected]>
 Date:   Sat Oct 20 11:10:56 2018 +0200
 
     Enable extended_glob in zgen-update
     
     The (^.git)/* glob will fail without it.

@zalberico
Copy link

zalberico commented Jul 20, 2021

If you're landing here confused - it's possible that your shell is in bash instead of zsh which will give you the same error.

If that's the case when you launch the terminal macOS should give you the command to switch the shell to zsh and then things should work.

jtt9340 pushed a commit to jtt9340/zgen that referenced this issue Jan 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants