-
Notifications
You must be signed in to change notification settings - Fork 135
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
[bug]: mv
ice does not rename file on initial run
#129
Comments
Can you please share the output of |
|
Actually that is setopt in the case where it works. When it doesn't work, it is
I see that there is no extendedglob there, could that be the cause in your opinion? How should it be fixed? Should the zinit user be expected to set it correctly before calling zinit? |
Actually, even if I call More details to help pin it down: If I run If I run |
No user-config should be mandatory, it's zinit's job to set zsh opts in the functions where it's behavior depends on the value of those. We will fix this in zinit ;) |
In #199 I had some fun trying to figure out why mv/atclone/... are not run after I deleted the whole `~/.zinit/plugins/* dir and I found one codepath which resulted in no hooks getting registered, effectively not running any ices: When +.zinit-compinit:2> [[.zinit-compinit:2: bad math expression: operand expected at `/Users/jan...'
-n '' ]] The redirect to dev null hides the error but the error still results in not finishing the sourcing of the I did the following change and it seems to fix the problem but to be honest I do not understand that code at all so I do not know what side effects this might have: --- a/zinit-install.zsh
+++ b/zinit-install.zsh
@@ -609,7 +609,7 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
#
# No arguments.
.zinit-compinit() {
- [[ -n ${OPTS[opt_-p,--parallel]} && $1 != 1 ]] && return
+ [[ -n $OPTS && -n ${OPTS[opt_-p,--parallel]} && $1 != 1 ]] && return
emulate -LR zsh
builtin setopt nullglob extendedglob warncreateglobal typesetsilent Maybe interesting for @percee to try out? |
I opened #241 for the above idea. |
@jankatins I'm currently redoing my config and I didn't add zinit back in yet. I'll try it when I get there tho. Thanks very much! |
You shouldn't delete only the plugins directory, ever. If you want to delete plugins, run:
You break zinit when you delete the plugins directory since it holds
Indeed, it avoids this issue altogether. Originally posted by @vladdoster in #241 (comment) |
@percee, Same idea for deleting a single plugin via Instead, it should be deleted via:
|
I'm unable to replicate this issue
Config:
|
Just commenting on the "don't run rm": While I agree that one "shouldn't do it", it's nice if a program is forgiving about user errors. Lines 1217 to 1230 in bad7af3
Nice :-) |
mv
ice does not rename file on initial run
@jankatins, did your PR (i.e, escaping exclamation marks) happen to fix this issue? |
@vladdoster As far as my understanding here goes, #241 should have fixed this. |
@jankatins, Thanks for confirmation. I'll double check before closing this issue. |
I can confirm this seems to be fixed and completion still works as expected 👍🏻.
|
My understanding was that the original issue was about creating direnv right after installing zinit. That would match the problem in #241, which would fail if some default folders would not be there during sourcing of zinit. See this comment:
|
I think the easiest to test all of this would be to add a final |
🎉 This issue has been resolved in version 3.8.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Issue description
When starting zinit for the first time, using the direnv hook given in zinit wiki:
The renaming (direnv* to direnv) does not happen:
ziextract: Successfully extracted and assigned +x chmod to the file:
direnv.linux-amd64'.`The file direnv.linux-amd64 isn't renamed to direnv.
If however I then rm -rf ~/.local/share/zinit/plugins/direnv---direnv and start zsh again, I get:
ziextract: Successfully extracted and assigned +x chmod to the file:
direnv.linux-amd64'.renamed 'direnv.linux-amd64' -> 'direnv'`
So it seems to only happen during the very first time zinit is setup.
zinit config
zinit version or commit ID
e8058a8
zsh version
5.8
host info
OSTYPE=linux-gnu CPUTYPE=x86_64 MACHTYPE=x86_64 5.10.60.1-microsoft-standard-WSL2 VERSION="11 (bullseye)" ID=debian
The text was updated successfully, but these errors were encountered: