When starting Zsh as the shell in Cygwin 1.7, I get the escape characters in plain text. When using Zsh with the -l option, this is resolved. Why is this?

enter image description here

As you can see, the terminal renders the Bash prompt correctly, but the Zsh prompt does not render the prompt as ANSI escape sequences.


zsh starts a new interactive shell, zsh -l starts a login shell.

The main difference between a login shell and any other interactive shell is that a login shell reads different configuration files. For zsh this comes down to: /etc/zprofile, ~/.zprofile, /etc/zlogin and ~/.zlogin.

The reason why the prompts acts differently is probably due to a setting in one of these files.

For a longer and more detailed explaination, see chapter 2, section 6 of this guide.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.