修改mac中终端terminal的前缀格式的方法

先上效果:
修改mac中终端terminal的前缀格式的方法

可以直接在terminal里像下面这样设置:

cd ~
vi .bash_profile

# 在 .bash_profile 中, 添加:
export PS1="xxx"

在这个文件里的最后一行中加入:

export PS1="[\A] (ノ>ω<)ノ \w $ "

[\A]的意思是显示当前时间;
\w是显示当前路径(current working directory);

其他的格式可以在这个网站里找到:
https://ss64.com/bash/syntax-prompt.html

背景和透明度可以再preference设置里面改:D