How can I change the color of my prompt in zsh (different from normal text)?

前端 未结 10 1882
醉梦人生
醉梦人生 2020-12-07 07:34

To recognize better the start and the end of output on a commandline, I want to change the color of my prompt, so that it is visibly different from the programs output. As I

10条回答
  •  执笔经年
    2020-12-07 08:18

    Try my favorite: put in

    ~/.zshrc
    

    this line:

    PROMPT='%F{240}%n%F{red}@%F{green}%m:%F{141}%d$ %F{reset}'
    

    don't forget

    source ~/.zshrc
    

    to test the changes

    you can change the colors/color codes, of course :-)

提交回复
热议问题