I'm moving from bash to zsh and getting stuck on the prompt. My Manjaro defines it one way, Ubuntu another.

So I like, e.g. the prompt called "clint". But it's not exactly what I want. I can find more or less adequate resources that help me define my own prompt, but I don't know how this particular one is composed.

Where can I find its definition?


zsh stores its prompt setups and defintions in /usr/share/zsh/functions/Prompts/.

So if you want to take a look what prompt clint does behind the curtains, first find the right file:

$ ls /usr/share/zsh/functions/Prompts/*clint*

And open it in your favorite text editor.

echo $PS1

And to find where it is defined, try the commmand below:

grep 'PS1' $HOME/.bash{rc,_profile}
  • huh, PS1 seems to work. As for the rest of your answer, this is zsh, not bash. the "built-in" prompt is definitely not defined anywhere in my home. – velis Nov 17 '20 at 9:31

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.