2005 12 10: Some cool tweaks..
might be something to include in .bashrc or /etc/profile
If you have most (even better then less, which is better then more),
use it for your man pages etc... with the $PAGER env. var.
/etc/profile
Change the terminal title (in xterm or putty for example)..
Playing with PS1 (do you remember in DOS: prompt $P$G ??)
Well try some of these..
My cool colors..
terminal title magic
more bash prompts !
If you have most (even better then less, which is better then more),
use it for your man pages etc... with the $PAGER env. var.
/etc/profile
export PAGER=/usr/bin/most
Change the terminal title (in xterm or putty for example)..
echo -n -e "\033]0;Your title here\007"
orecho -n -e "\e]2;titlebar\a"
Playing with PS1 (do you remember in DOS: prompt $P$G ??)
Well try some of these..
My cool colors..
export PS1="\[\e[31;1m\]\u\[\e[30;1m\]@\[\e[32;1m\]\H\[\e[30;1m\]> \[\e[0m\]"
terminal title magic

export PS1="\[\e]2;\u@\H \w\a\e[32;1m\]>\[\e[0m\] "
Sequence Description
\a The ASCII bell character ( you can also type \007 )
\d Date in "Wed Sep 06" format
\e ASCII escape character ( you can also type \033 )
\h First part of hostname ( such as "mybox" )
\H Full hostname ( such as "mybox.mydomain.com" )
\j The number of processes you've suspended in this shell by hitting ^Z
\l The name of the shell's terminal device ( such as "ttyp4" )
\n Newline
\r Carriage return
\s The name of the shell executable ( such as "bash" )
\t Time in 24-hour format ( such as "23:01:01" )
\T Time in 12-hour format ( such as "11:01:01" )
\@ Time in 12-hour format with am/pm
\u Your username
\v Version of bash ( such as 2.04 )
\V Bash version, including patchlevel
\w Current working directory ( such as "/home/drobbins" )
\W The "basename" of the current working directory ( such as "drobbins" )
\! Current command's position in the history buffer
\# Command number ( this will count up at each prompt, as long as you type something )
\$ If you are not root, inserts a "$"; if you are root, you get a "#"
\xxx Inserts an ASCII character based on three-digit number xxx
( replace unused digits with zeros, such as "\007" )
\\ A backslash
\[ This sequence should appear before a sequence of characters that don't move the cursor
( like color escape sequences ).
This allows bash to calculate word wrapping correctly.
\] This sequence should appear after a sequence of non-printing characters.
\a The ASCII bell character ( you can also type \007 )
\d Date in "Wed Sep 06" format
\e ASCII escape character ( you can also type \033 )
\h First part of hostname ( such as "mybox" )
\H Full hostname ( such as "mybox.mydomain.com" )
\j The number of processes you've suspended in this shell by hitting ^Z
\l The name of the shell's terminal device ( such as "ttyp4" )
\n Newline
\r Carriage return
\s The name of the shell executable ( such as "bash" )
\t Time in 24-hour format ( such as "23:01:01" )
\T Time in 12-hour format ( such as "11:01:01" )
\@ Time in 12-hour format with am/pm
\u Your username
\v Version of bash ( such as 2.04 )
\V Bash version, including patchlevel
\w Current working directory ( such as "/home/drobbins" )
\W The "basename" of the current working directory ( such as "drobbins" )
\! Current command's position in the history buffer
\# Command number ( this will count up at each prompt, as long as you type something )
\$ If you are not root, inserts a "$"; if you are root, you get a "#"
\xxx Inserts an ASCII character based on three-digit number xxx
( replace unused digits with zeros, such as "\007" )
\\ A backslash
\[ This sequence should appear before a sequence of characters that don't move the cursor
( like color escape sequences ).
This allows bash to calculate word wrapping correctly.
\] This sequence should appear after a sequence of non-printing characters.
more bash prompts !
