74824
警告メッセージを解消したい。

oh-my-zshとpowerlevel10kをダウンロードしました。  
警告メッセージがターミナル起動時に出るようになり、無視して作業していくと  
途中で新しいウインドウが開いて(END)が表示されるようになりました。

```

    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.
    
```

と記述があるのです、参照サイトに行ってもやり方が分からず、、、

動画で勉強しているのですが、動画作成している方もこちらの対処方法は分からないようで、どなたかご教授いただける方いらっしゃいませんか？

### 発生している警告メッセージ

```

    Last login: Sun Mar 21 13:17:08 on console
    
    [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
    
```

### 自分で試したこと

  * サイトに行って翻訳ツールを使って読み解こうとしたが、何がなんやら、、、
  * 再度oh-my-zshをインストールを試みたが、もう入っていると表示される

**追記**

```

    # Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
    # Initialization code that may require console input (password prompts, [y/n]
    # confirmations, etc.) must go above this block; everything else may go below.
    if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
      source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
    fi
    
    # If you come from bash you might have to change your $PATH.
    # export PATH=$HOME/bin:/usr/local/bin:$PATH
    
    # Path to your oh-my-zsh installation.
    export ZSH="/Users/ユーザー名/.oh-my-zsh"
    
    # Set name of the theme to load --- if set to "random", it will
    # load a random theme each time oh-my-zsh is loaded, in which case,
    # to know which specific one was loaded, run: echo $RANDOM_THEME
    # See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
    #ZSH_THEME="robbyrussell"
    ZSH_THEME="powerlevel10k/powerlevel10k"
    # Set list of themes to pick from when loading at random
    # Setting this variable when ZSH_THEME=random will cause zsh to load
    # a theme from this variable instead of looking in $ZSH/themes/
    # If set to an empty array, this variable will have no effect.
    # ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
    
    # Uncomment the following line to use case-sensitive completion.
    # CASE_SENSITIVE="true"
    
    # Uncomment the following line to use hyphen-insensitive completion.
    # Case-sensitive completion must be off. _ and - will be interchangeable.
    # HYPHEN_INSENSITIVE="true"
    
    # Uncomment the following line to disable bi-weekly auto-update checks.
    # DISABLE_AUTO_UPDATE="true"
    
    # Uncomment the following line to automatically update without prompting.
    # DISABLE_UPDATE_PROMPT="true"
    
    # Uncomment the following line to change how often to auto-update (in days).
    # export UPDATE_ZSH_DAYS=13
    
    # Uncomment the following line if pasting URLs and other text is messed up.
    # DISABLE_MAGIC_FUNCTIONS="true"
    
    # Uncomment the following line to disable colors in ls.
    # DISABLE_LS_COLORS="true"
    
    # Uncomment the following line to disable auto-setting terminal title.
    # DISABLE_AUTO_TITLE="true"
    
    # Uncomment the following line to enable command auto-correction.
    # ENABLE_CORRECTION="true"
    
    # Uncomment the following line to display red dots whilst waiting for completion.
    # Caution: this setting can cause issues with multiline prompts (zsh 5.7.1 and newer seem to work)
    # See https://github.com/ohmyzsh/ohmyzsh/issues/5765
    # COMPLETION_WAITING_DOTS="true"
    
    # Uncomment the following line if you want to disable marking untracked files
    # under VCS as dirty. This makes repository status check for large repositories
    # much, much faster.
    # DISABLE_UNTRACKED_FILES_DIRTY="true"
    
    # Uncomment the following line if you want to change the command execution time
    # stamp shown in the history command output.
    # You can set one of the optional three formats:
    # "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
    # or set a custom format using the strftime function format specifications,
    # see 'man strftime' for details.
    # HIST_STAMPS="mm/dd/yyyy"
    
    # Would you like to use another custom folder than $ZSH/custom?
    # ZSH_CUSTOM=/path/to/new-custom-folder
    
    # Which plugins would you like to load?
    # Standard plugins can be found in $ZSH/plugins/
    # Custom plugins may be added to $ZSH_CUSTOM/plugins/
    # Example format: plugins=(rails git textmate ruby lighthouse)
    # Add wisely, as too many plugins slow down shell startup.
    plugins=(git)
    
    source $ZSH/oh-my-zsh.sh
    
    # User configuration
    
    # export MANPATH="/usr/local/man:$MANPATH"
    
    # You may need to manually set your language environment
    # export LANG=en_US.UTF-8
    
    # Preferred editor for local and remote sessions
    # if [[ -n $SSH_CONNECTION ]]; then
    #   export EDITOR='vim'
    # else
    #   export EDITOR='mvim'
    # fi
    
    # Compilation flags
    # export ARCHFLAGS="-arch x86_64"
    
    # Set personal aliases, overriding those provided by oh-my-zsh libs,
    # plugins, and themes. Aliases can be placed here, though oh-my-zsh
    # users are encouraged to define aliases within the ZSH_CUSTOM folder.
    # For a full list of active aliases, run `alias`.
    #
    # Example aliases
    # alias zshconfig="mate ~/.zshrc"
    # alias ohmyzsh="mate ~/.oh-my-zsh"
    
    # To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
    [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
    
```

**再追記**

(どこを隠したら良かったのか分からなかったので、念の為に数字は ０ にしております。)

```

    [oh-my-zsh] Insecure completion-dependent directories detected:
    drwxrwxr-x  0 ユーザー名  admin   00  0 00  2020 /usr/local/share/zsh
    drwxrwxr-x  0 ユーザー名  admin  000  0 00  2020 /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.
    
    compinit:503: no such file or directory: /usr/local/share/zsh/site-functions/_brew_cask
    
```

**再々追記**

警告メッセージが表示されなくなりました！教えてくださってありがとうございました！

また、”途中で新しいウインドウが開いて（END)表示される”はそういう仕様だった様です。ごめんなさい。  
git config --global --replace-all core.pager "less -F -X"  
とターミナルで打つと解消出来ました。
CC BY-SA 4.0
2021-03-21T14:18:33.810
74802
2021-03-22T23:57:15.487
2021-03-22T23:57:15.487
3060
44428
question
macos zsh
ターミナル起動時に表示される警告メッセージを解消したい
p10kのinstant
prompt(zshの長くなりがちなロード時間をスキップして素早く入力可能状態にする機能)が実行される前に、コンソールになにか出力しようとする処理があることで警告が出ているようです。

もしp10kの設定がまだ完了していなければ、

```

    $ p10k configure
    
```

というコマンドを実行して、対話形式の設定(見た目についてYes/Noや1,2などで質問に答えていく)を完了すると解決するかもしれません。

それで解決しない場合、次のことを試してみてください。

p10kをインストールすると `.zshrc` のなかに以下のようなコードが追加されていると思いますが、  
もし `.zshrc`
の中に書いている他の処理で、パスワード入力などコンソールへの入出力が生じるものがあれば、それはこのコードの上に書くようにし、それ以外のものはこの下に書くようにしてください。

```

    # Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
    # Initialization code that may require console input (password prompts, [y/n]
    # confirmations, etc.) must go above this block; everything else may go below.
    if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
      source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
    fi
    
```
CC BY-SA 4.0
2021-03-21T14:50:49.720
74803
2021-03-21T15:07:00.140
2021-03-21T15:07:00.140
44416
44416
74802
answer
.zshrc 中の `source $ZSH/oh-my-zsh.sh` の前に `ZSH_DISABLE_COMPFIX="true"` を追加して

```

    ZSH_DISABLE_COMPFIX="true"
    source $ZSH/oh-my-zsh.sh
    
```

としてみたらどうでしょうか？
CC BY-SA 4.0
2021-03-22T13:54:02.537
74824
2021-03-22T13:54:02.537
7290
74802
answer