agkozak/zsh-z

Crash after installation

aruiplex opened this issue · 3 comments

I follow the For oh-my-zsh users and then reopen the terminal, the following info displayed.

[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

-- console output produced during zsh initialization follows --

/home/aruix/.oh-my-zsh/custom/plugins/zsh-z/zsh-z.plugin.zsh:70: command not found: ^M
/home/aruix/.oh-my-zsh/custom/plugins/zsh-z/zsh-z.plugin.zsh:72: command not found: ^M
/home/aruix/.oh-my-zsh/custom/plugins/zsh-z/zsh-z.plugin.zsh:23: condition expected: ^M

I do not know why.

Thanks in advance.

After I use dos2unix to the process the file zsh-z.plugin.zsh crash gone.

Hi! You've probably got a case of issue 32. Are you using Windows?

Type

uname -a

at the command line and tell me what it says. Then type

cat ~/.gitconfig

We'll work from there.

What you did to fix the problem was correct, but it was probably only temporary. Your Git configuration is probably turning my Unix-style linefeeds into Windows-style CRLFs (you correctly identified the ^Ms as carriage returns). It's worth identifying the source of the problem or this will keep happening.

Yes, very thank you.