Monday, February 13, 2012

Zsh Workshop: The Prompt

Zsh Workshop: The Prompt: "The zsh prompts are extremely configurable. In fact, the zsh prompts get their own type of expansion. (If you would like to use prompt expansion on other strings, simply use the -P argument to zsh's print builtin.)
The primary zsh prompt string is contained in the shell variable PROMPT. This variable is also known as PS1. (They are the exact same - assigning to one sets the other.)

Before zsh actually displays them, the prompts are first subjected to parameter expansion, command substitution, and arithmetic expansion. (But ONLY if the PROMPT_SUBST shell option is turned on)


'via Blog this'