well i went back to the site
and you were right, all the colours and things i needed were there
i found out how to put the time into the prompt
as well as the current directory using ${PWD}
but there's a snag:

say i'm in /tmp/ and i type this:

  PS1="[\t \u@\[\033[1;31m\]\h\[\033[0m\] ${PWD}]\$

my prompt then looks like this:

  [09:51:00 root@machinename /tmp/]$

problem 1:  isn't the "$" supposed to be a "#" while root?
but then i type this:

  cd ../home/

and my prompt still says this:

  [09:51:35 root@machinename /tmp/]$

problem 2: the time gets updated, but no the current dir.


i checked out PROMPT_COMMAND and found only more ways to change the prompt,
not to 'reload' it for lack of a better word.  i even tried removing ${PWD}
from PS1 and putting into the PROMPT_COMMAND... no no avail.

i could use a win here...  the slashes and brackets are spinning about my
head, dancing and mocking me.

_________________________________
daniel a. g. quinn
starving programmer

a little science may take one away from God;
much science brings one back
  - roger bacon



----- Original Message -----
> Daniel,
>
> On Monday May 27, 2002 06:52, you said something about:
> > thanks for that link
> > but while most of the info was completely new to me
> >   (and therefore very helpful)
> > i didn't find what i was looking for.
>
> You just didn't quite get it is all. It's all in there.
>
> > right now my prompt looks like this:
> >
> >   [gabriel@drall gabriel]$
> >
> > but i want it to look like this:
> >
> >   [gabriel@drall /home/gabriel]$
> >            ^^^^^ (colour maybe?)
>
> Here's lots of color and the home dir coming out the way you want. The
"\w"
> is what you were asking for but would not have given you the
> "/home/gabriel" as it would have expanded to "~". So instead we use the
> $PWD to get what we want. Of course it has to put in there as ${PWD}.
>
> export PS1=$'[\[\033[1;34m\]\\u@\\h\[\033[0m\]
\[\033[1;31m\]${PWD}\[\033[0m\]]\[\033[1;33m\]\\$ \[\033[0m\]'
>
> Don't forget to put this in your .bashrc, of course for an xterm you may
> need to do something with the PROMPT_COMMAND variable.
>
> Feel free to tone down the color some. ;)
>
> True enlightenment is left as an exercise for the reader. But you should
> find the link provided will answer any/all of your questions.
>
> Previously provided link...
> > > http://www.linux.org/docs/ldp/howto/Bash-Prompt-HOWTO/index.html
>
> --
> Brian Ashe                                                     CTO
> Dee-Web Software Services, LLC.                  [EMAIL PROTECTED]



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to