bash prompt customize

Posted in Note with tags , .

May 3, 09

Comments

Trackback

Using Linux again. Now got fresh Ubuntu 9.04 installed and all my old Ubuntu configurations were lost. It takes time to resume to an acceptable status.

Here is a note for bash prompt customize:

  1. Open ~/.bashrc
  2. un-comment force_color_prompt=yes
  3. change PS1 assignment before else clause
  4. Save. Then open a new terminal to check the effect.

This is my PS1 value:

PS1='${debian_chroot:+($debian_chroot)}\[\e[31;01m\]~L~\[\e[00m\]\[\e[30;02m\]:\[\e[00m\]\[\e[36;02m\]\w\[\e[00m\]\[\e[37;02m\]\$\[\e[00m\] '

And it looks like this:

~L~: /usr/local$

Information about these pattern, color and veriables can be found here:

http://wiki.archlinux.org/index.php/Color_Bash_Prompt



No comments!

Reply