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

前端 未结 10 1888
醉梦人生
醉梦人生 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:10

    Zsh comes with colored prompts builtin. Try

    autoload -U promptinit && promptinit
    

    and then prompt -l lists available prompts, -p fire previews the "fire" prompt, -s fire sets it.

    When you are ready to add a prompt add something like this below the autoload line above:

    prompt fade red
    

提交回复
热议问题