How to add an icon to the bash prompt

前端 未结 6 916
予麋鹿
予麋鹿 2021-02-04 16:09

I know you can edit the bash prompt permanently by editing the PS1 variable in your ~/.bashrc file, mine looks like this:

PS1=\"\\[\\e[0;31m\\]

        
6条回答
  •  醉酒成梦
    2021-02-04 16:57

    The closer you'll get are white and black flags:

    ⚐ → U+2690 ; WHITE FLAG
    ⚑ → U+2691 ; BLACK FLAG
    

    The above are Unicode characters. You could also look for a font with flags - I don't know of any.

提交回复
热议问题