title: Trying to add Zsh shell (with Oh My Zsh!) to new Windows Terminal, what's the right way?
body: <p>Using <a href="https://www.msys2.org/" rel="nofollow noreferrer">MSYS2</a> and following <a href="https://medium.com/@borekb/zsh-via-msys2-on-windows-3964a943b1ce" rel="nofollow noreferrer">Zsh on Windows via MSYS2</a> guide I installed Zsh shell on my Windows 10 Pro workstation. I installed <em>Oh My Zsh!</em> too via <code>curl</code> and <a href="https://github.com/romkatv/powerlevel10k#oh-my-zsh" rel="nofollow noreferrer">powerlevel10k</a> theme. Now I'd like to use this shell with new <em>Windows Terminal (Preview)</em> so in <code>profiles.json</code> I added this configuration:</p>
  
  <pre><code>{
      "guid": "{00000000-0000-0000-bb55-000000000003}",
      "acrylicOpacity" : 0.75,
      "closeOnExit" : true,
      "commandline" : "\"C:\\msys64\\usr\\bin\\zsh.exe\" -i -l",
      "historySize" : 9001,
      "icon" : "C:\\msys64\\mingw64\\share\\git\\git-for-windows.ico",
      "name" : "Oh my Zsh!",
      "padding" : "0, 0, 0, 0",
      "snapOnInput" : true,
      "startingDirectory" : "%USERPROFILE%",
      "useAcrylic" : true
  }
  </code></pre>
  
  <p>this works roughly but the prompt is not shown correctly and, every time I start the terminal, the following error is shown:</p>
  
  <pre><code>[ERROR]: gitstatus failed to initialize.
  
    Your Git prompt may disappear or become slow.
  
    Run the following command to retry with extra diagnostics:
  
      GITSTATUS_LOG_LEVEL=DEBUG gitstatus_start POWERLEVEL9K
  
    If this command produces no output, add the following parameter to ~/.zshrc:
  
      GITSTATUS_LOG_LEVEL=DEBUG
  
    With this parameter gitstatus will print additional information on error.
  </code></pre>
  
  <p>If i run <code>GITSTATUS_LOG_LEVEL=DEBUG gitstatus_start POWERLEVEL9K</code>, I get:</p>
  
  <pre><code>[ERROR]: gitstatus failed to initialize.
  
    Your Git prompt may disappear or become slow.
  
    The content of /tmp/gitstatus.197609.3944.1583052616.xtrace.log (gitstatus_start xtrace):
  
      +(anon):7&gt; ((  ! _GITSTATUS_STATE_POWERLEVEL9K  ))
      +(anon):8&gt; [[ -r /proc/version &amp;&amp; 'MSYS_NT-10.0-19041 version 3.0.7-338.x86_64 (Alexx@WARLOCK) (gcc version 9.1.0 (GCC) ) 2019-07-11 10:58 UTC' == *Microsoft* ]]
      +(anon):11&gt; print -rn
      +(anon):12&gt; zsystem flock -f lock_fd /tmp/gitstatus.197609.3944.1583052616.lock
      +(anon):13&gt; [[ 14 == &lt;1-&gt; ]]
      +(anon):15&gt; typeset -gi '_GITSTATUS_LOCK_FD_POWERLEVEL9K=lock_fd'
      +(anon):18&gt; '(anon)' /proc/self/fd/16
      +(anon):1&gt; typeset -gi 'GITSTATUS_DAEMON_PID_POWERLEVEL9K=4011'
      +(anon):2&gt; sysopen -r -o cloexec -u resp_fd -- /proc/self/fd/16
      +(anon):3&gt; [[ 18 == &lt;1-&gt; ]]
      +(anon):4&gt; typeset -gi '_GITSTATUS_RESP_FD_POWERLEVEL9K=resp_fd'
      +(anon):107&gt; typeset -gi '_GITSTATUS_STATE_POWERLEVEL9K=1'
      +(anon):110&gt; ((  ! async  ))
      +(anon):111&gt; ((  _GITSTATUS_CLIENT_PID_POWERLEVEL9K == sysparams[pid]  ))
      +(anon):113&gt; local pgid
      +(anon):114&gt; ((  0 &lt; 20  ))
      +(anon):115&gt; [[ -t 18 ]]
      +(anon):116&gt; sysread -s 20 -t 5.0000000000 -i 18 'pgid[$#pgid+1]'
      +(anon):116&gt; return
                           ^ this command failed (5)
  
    The content of /tmp/gitstatus.197609.3944.1583052616.daemon.log (gitstatus daemon log):
  
      +(anon):20&gt; local pgid=4011
      +(anon):21&gt; [[ 4011 == &lt;1-&gt; ]]
      +(anon):91&gt; ((  lock_fd == -1  ))
      +(anon):25&gt; trap '' PIPE
      +(anon):27&gt; [[ -z '' ]]
      +(anon):28&gt; local kernel
      +(anon):94&gt; zsystem flock -- /tmp/gitstatus.197609.3944.1583052616.lock
      +(anon):29&gt; kernel=+(anon):29&gt; uname -s
      +(anon):29&gt; kernel=msys_nt-10.0-19041
      +(anon):30&gt; [[ -n msys_nt-10.0-19041 ]]
      +(anon):33&gt; [[ '' == /* ]]
      +(anon):35&gt; ((  0  ))
      +(anon):37&gt; [[ -n '' ]]
      +(anon):40&gt; local os
      +(anon):41&gt; case msys_nt-10.0-19041 (linux)
      +(anon):41&gt; case msys_nt-10.0-19041 (cygwin_nt-*)
      +(anon):41&gt; case msys_nt-10.0-19041 (mingw | msys)
      +(anon):41&gt; case msys_nt-10.0-19041 (*)
      +(anon):49&gt; os=msys_nt-10.0-19041
      +(anon):51&gt; local arch
      +(anon):52&gt; arch=+(anon):52&gt; uname -m
      +(anon):52&gt; arch=x86_64
      +(anon):53&gt; [[ -n x86_64 ]]
      +(anon):54&gt; local daemons=( /c/Users/icolumbro/.oh-my-zsh/custom/themes/powerlevel10k/gitstatus/usrbin/gitstatusd-msys_nt-10.0-19041-x86_64 /c/Users/icolumbro/.oh-my-zsh/custom/themes/powerlevel10k/gitstatus/usrbin/gitstatusd-msys_nt-10.0-19041-x86_64-static /c/Users/icolumbro/.oh-my-zsh/custom/themes/powerlevel10k/gitstatus/bin/gitstatusd-msys_nt-10.0-19041-x86_64 /c/Users/icolumbro/.oh-my-zsh/custom/themes/powerlevel10k/gitstatus/bin/gitstatusd-msys_nt-10.0-19041-x86_64-static )
      +(anon):57&gt; daemons=( )
      +(anon):58&gt; daemons=( )
      +(anon):59&gt; ((  0  ))
      +(anon):59&gt; return
      +(anon):86&gt; local -i ret=1
      +(anon):87&gt; kill -- -4011
  
    Your system information:
  
      zsh:      5.8
      uname -a: MSYS_NT-10.0-19041 z800 3.0.7-338.x86_64 2019-07-11 10:58 UTC x86_64 Msys
  
    If you need help, open an issue and attach this whole error message to it:
  
      https://github.com/romkatv/gitstatus/issues/new
  </code></pre>
  
  <p>Can you help me to configure <em>Windows Terminal</em> to use <em>Oh My Zsh!</em> with <em>powerlevel10k</em> theme correctly, please?</p>