Closed aretor closed 3 years ago
Do you get the same errors if you disable powerlevel10k?
How can I disable it? I was searching a way to do it, but I have not found one.
Thanks for pointing it out (perhaps change "uninstall" with "uninstall/disable"?). The error persists, so I guess it's a problem of oh-my-zsh or zsh. I am closing the issue.
Perhaps now the original error that you've posted is clearer. Powerlevel10k said that zsh produces output during initialization and that's bad. Then it showed the output.
@romkatv would it make sense (and if technically possible) to show output during the initialization first, and explanation after? My guess is that users see Powerlevel10k
in first paragraph and assume it's p10k error. Given the length of message users may not read it till end, where actual offending output shown.
From my personal experience, I had this error once and it took me some effort to muster cognitive focus to properly read message to the end.
I think it would help users who start reading from the top and give up. There are also users who read only the bottom. For those it would be worse because the actual errors may not even be on the screen. I'm not sure which of those options is better.
FWIW, if you run p10k configure
under zsh4humans, it doesn't even ask whether you want verbose or quiet instant prompt. It always makes it quiet. This works great because it's really damn hard to screw up instant prompt when using zsh4humans. For zsh configs that I don't control, verbose seems like a safer default.
Perhaps now the original error that you've posted is clearer. Powerlevel10k said that zsh produces output during initialization and that's bad. Then it showed the output.
I wrongly assumed that it could be something related to p10k because I have used zsh/oh-my-zsh for long time while I have just used p10k recently and it is the first time I see these errors. My bad :)
Would you have made the same assumption if the two blocks in the error message were swapped? Like this:
fatal: --local can only be used inside a git repository
fatal: --local can only be used inside a git repository
fatal: not a git repository (or any parent up to mount point /mnt)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not in a git directory
fatal: not in a git directory
fatal: not in a git directory
fatal: not in a git directory
fatal: not in a git directory
fatal: not in a git directory
fatal: --local can only be used inside a git repository
fatal: --local can only be used inside a git repository
fatal: not a git repository (or any parent up to mount point /mnt)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /mnt)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /mnt)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
[WARNING]: Console output during zsh initialization detected.
When using Powerlevel10k with instant prompt, console output during zsh
initialization may indicate issues.
You can:
- Recommended: Change ~/.zshrc so that it does not perform console I/O
after the instant prompt preamble. See the link below for details.
* You will not see this error message again.
* Zsh will start quickly and prompt will update smoothly.
- Suppress this warning either by running p10k configure or by manually
defining the following parameter:
typeset -g POWERLEVEL9K_INSTANT_PROMPT=quiet
* You will not see this error message again.
* Zsh will start quickly but prompt will jump down after initialization.
- Disable instant prompt either by running p10k configure or by manually
defining the following parameter:
typeset -g POWERLEVEL9K_INSTANT_PROMPT=off
* You will not see this error message again.
* Zsh will start slowly.
- Do nothing.
* You will see this error message every time you start zsh.
* Zsh will start quickly but prompt will jump down after initialization.
For details, see:
https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt
I would rewrite in this way (though it is my personal taste):
[WARNING]: The following console output generated during zsh initialization has been detected.
[ZSH]
> fatal: --local can only be used inside a git repository
> fatal: --local can only be used inside a git repository
> fatal: not a git repository (or any parent up to mount point /mnt)
> Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
> fatal: not in a git directory
> fatal: not in a git directory
> fatal: not in a git directory
> fatal: not in a git directory
> fatal: not in a git directory
> fatal: not in a git directory
> fatal: --local can only be used inside a git repository
> fatal: --local can only be used inside a git repository
> fatal: not a git repository (or any parent up to mount point /mnt)
> Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
> fatal: not a git repository (or any parent up to mount point /mnt)
> Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
> fatal: not a git repository (or any parent up to mount point /mnt)
> Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
[/ZSH]
When using ...
...
If the content of the message was as you suggested, would you have thought that powerlevel10k is the culprit?
As said before, my suspects were directed towards p10k just because I had not had these problems with zsh before, so I got it totally wrong. Sometimes happens when you have deadlines and need to fix problems quickly!
That said, IMHO, I think that separating more the output coming from zsh from that coming from p10k can help the user understand better who is the culprit. Previously, I had a similar output for another problem with p10k and I spent some time separating the outputs. Nothing serious, but I think there can be a margin for improvement here.
As a further note, the zsh reported output misses an update request message from oh-my-zsh (Would you like to update [Y/n], etc.
), which indeed is displayed when I disable p10k.
That said, IMHO, I think that separating more the output coming from zsh from that coming from p10k can help the user understand better, who is the culprit.
On one hand, I don't like making changes without having at least one user to whom that would be helpful. Apparently this change would not have helped you, so we are left speculating about other users. On the other hand, I know that many users are confused by the current wording of this message, so changing it is not a terrible idea even if these changes won't lead to material improvement.
I might change when I get a free minute.
As a further note, the zsh reported output misses an update request message from oh-my-zsh (
Would you like to update [Y/n], etc.
), which indeed is displayed when I disable p10k.
This is expected if you enable instant prompt.
When I start a new instance of zsh, I get the following message
It started giving this error after I set
git config --local user.name xxxxx
anduser.email yyyyy
on one of my repositories.