zsh 에러메세지 – [WARNING]: Console output during zsh initialization detected.

zsh을 사용하던 도중 에러메메시지가 뜨기 시작했다. 언제 업데이트 하고나서 부터인가??? 귀찮아서 안하다가 이제 확인.

p10k configure

p10k 참 터미널 UI 세팅하기 편하고 좋긴한데…. 경고가 너무 뜸..

https://github.com/romkatv/powerlevel10k

Instatnt prompt 경고메세지

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

Powerlevel10k 테마 쓸때 Powerlevel10k instant prompt 사용하면서 나는 워닝메세지다..

Instant prompt

.zshrc 실행할때 플러그인이 너무 많으면 실행할때 오래걸릴수가 있다.(예를 들어 pyenv, nvm)

Powerlevel10k No Instant Prompt
instant prompt

근데 powerlevel10k에서는 이런 지연을 막아주는 기능이 있다. 그게 Instant prompt!~

아마 /.zshrc에서 맨위에 를 읽어보면 enable instant prompt 가 있을텐데 이게 지금 활성화 되어있는거다.
만약 실행하려면 powerlevel10k instant prompt

Powerlevel10k Instant Prompt
instant prompt

이게 활성화되려면 제일 윗줄에 있어야한다.

암튼 해결방법은 ~/.p10k.zsh 에서 아래코드 찾아서 off 이거나 quiet로 변경

그리고 에러메세지에 나왔던 설정들 바꾸는건 ❯ ~/.p10k.zsh 요기에 들어가 있음.
INSTANT 검색해보면 아래와같이 나와있다. verbose 로 해놓으면 계속 warning 나온다는말.

 1561   # Instant prompt mode.
 1562   #
 1563   #   - off:     Disable instant prompt. Choose this if you've tried instant prompt and found
 1564   #              it incompatible with your zsh configuration files.
 1565   #   - quiet:   Enable instant prompt and don't print warnings when detecting console output
 1566   #              during zsh initialization. Choose this if you've read and understood
 1567   #              https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt.
 1568   #   - verbose: Enable instant prompt and print a warning when detecting console output during
 1569   #              zsh initialization. Choose this if you've never tried instant prompt, haven't
 1570   #              seen the warning, or if you are unsure what this all means.
 1571   typeset -g POWERLEVEL9K_INSTANT_PROMPT=verbose

난 머 여러가지 많이 안쓰니까 그냥 typeset -g POWERLEVEL9K_INSTANT_PROMPT=off 처리

그럼 일단 첫번째는 해결한거고… 따로 밑에 또 에러가 나온다.

2. 권한문제

-- console output produced during zsh initialization follows --

[oh-my-zsh] Insecure completion-dependent directories detected:
drwxrwxr-x  3 inpokjeon  admin   96 12 16 22:21 /usr/local/share/zsh
drwxrwxr-x  4 inpokjeon  admin  128  9 24 13:13 /usr/local/share/zsh/site-functions

[oh-my-zsh] For safety, we will not load completions from these directories until
[oh-my-zsh] you fix their permissions and ownership and restart zsh.
[oh-my-zsh] See the above list for directories with group or other writability.

[oh-my-zsh] To fix your permissions you can do so by disabling
[oh-my-zsh] the write permission of "group" and "others" and making sure that the
[oh-my-zsh] owner of these directories is either root or your current user.
[oh-my-zsh] The following command may help:
[oh-my-zsh]     compaudit | xargs chmod g-w,o-w

[oh-my-zsh] If the above didn't help or you want to skip the verification of
[oh-my-zsh] insecure directories you can set the variable ZSH_DISABLE_COMPFIX to
[oh-my-zsh] "true" before oh-my-zsh is sourced in your zshrc file.

이거는 그냥 권한문제다 해결방법은 그냥

맨아래 설명대로 ~/.zshrc 에서 oh-my-zsh 호출하기전에 ZSH_DISABLE_COMPFIX=”true” 해주면 안나온다.

참 편하고 좋긴한데 이런 경고 메세지 좀 안떴으면 좋겠네.

덧글 삭제

이메일은 공개되지 않습니다. 필수 입력창은 * 로 표시되어 있습니다