[NBLUG/talk] Neat command line tricks
Jeremy Turner
jeremy at linuxwebguy.com
Wed Jul 9 09:58:01 PDT 2003
On Tue, 2003-07-08 at 11:26, Kevin Bingham wrote:
> Does anybody else have similar neat tricks?
I really like a colorful bash prompt, but I hate escaping everything
with \[\033[30;m... etc etc. I created the attached file which has some
color vars. My PS1 var looks like this:
PS1="$cyan\@ $yellow\u$white@$ltpurple\h$white:\
$green\w$white"'\$'"$clear "
Which makes my prompt look like this:
09:42am jeremy at athlonxp:~$
^^^^^^^ ^^^^^^ ^^^^^^^^ ^
cyan yellow ltpurple green
and the @, :, and $ (or #) are in white.
However I get a very strange side effect. When I type in two
characters, the line wraps back around and over the prompt. Then when
up-arrowing through the history, it totally munges up the line. Anyone
have any ideas?
--
Jeremy Turner <jeremy at linuxwebguy.com>
LinuxWebGuy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: colors
Type: text/x-sh
Size: 423 bytes
Desc: not available
Url : http://nblug.org/pipermail/talk/attachments/20030709/85a1bd48/colors.sh
More information about the talk
mailing list