我的Linux $PS配置(命令行提示样式)

来源:互联网 发布:网络教育入学考试时间 编辑:程序博客网 时间:2024/04/29 16:23

配置~/.bashrc

PS1='\e[33m[\u@\h:\w]\e[0m\n$'PS2='> 'PS4='+ '

显示效果:

[xiwang@Linux01:~/tasks/]
$<command here>


<<<<<<<<<<<<

Working with Git repository.

export PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;36m\]\w\[\033[00m\]$(parse_git_branch)$'