I want to change the color of the input text in zsh (the text that I type for each command). Example: in user@host> ls ~/
I would want ls ~/
to be yellow to stand out from standard output.
I know I can accomplish this in bash using
export PS1=" $BIGreen \u@\h \w \$ $IYellow"
At the end of the prompt, the color is set to Yellow, input text I type is yellow (with the appropriate color variables defined). And then
trap 'echo -ne "\e[0m"' DEBUG
Which resets the color to normal when the outputs of my command are displayed.
How can I accomplish this in zsh? Currently, I have
PROMPT=$'{$fg[green]%}%n@%{$fg[green]%}%m %# %{$fg[yellow]%}'
in .zshrc (setting color to yellow at the end) but it does not work. (I also wouldn't know how to set the color back to white after the command).
ls somepath[tab]
), at least for my settings (I think zsh is inserting an uncolored slash during autocompletion) but that's a very minor complaint. – Muntjac