Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How do i show full path in prompt
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Duplicate Threads
View previous topic :: View next topic  
Author Message
fwempa
Apprentice
Apprentice


Joined: 09 Oct 2005
Posts: 150

PostPosted: Fri Oct 14, 2005 4:39 am    Post subject: How do i show full path in prompt Reply with quote

I've done it before and can't find how to do it again...
HELP!!!!
Back to top
View user's profile Send private message
Dlareh
Advocate
Advocate


Joined: 06 Aug 2005
Posts: 2102

PostPosted: Fri Oct 14, 2005 5:05 am    Post subject: Reply with quote

What is your current PS1 ? (echo $PS1, and post the output with [ CODE ] tags)
_________________
"Mr Thomas Edison has been up on the two previous nights discovering 'a bug' in his phonograph." --Pall Mall Gazette (1889)
Are we THERE yet?
Back to top
View user's profile Send private message
fwempa
Apprentice
Apprentice


Joined: 09 Oct 2005
Posts: 150

PostPosted: Fri Oct 14, 2005 5:19 am    Post subject: Reply with quote

here you go
Code:
\[\0..[01;31m\]\h \[\033[01;34m\]\W$ \[\033[00m\]

Is there a source for the codes listed here. I think i remember an old RH site that had them listed.

thx
Back to top
View user's profile Send private message
Dlareh
Advocate
Advocate


Joined: 06 Aug 2005
Posts: 2102

PostPosted: Fri Oct 14, 2005 5:29 am    Post subject: Reply with quote

fwempa wrote:
here you go
Code:
\[\0..[01;31m\]\h \[\033[01;34m\]\W$ \[\033[00m\]

Is there a source for the codes listed here. I think i remember an old RH site that had them listed.

Ok, that is straight out of /etc/bash/bashrc for root. What you need to do is add the following to your ~/.bashrc :
Code:
PS1='\[\033[01;31m\]\h \[\033[01;34m\]\w \$ \[\033[00m\]'

(notice the lowercase \w)

And add this to your ~/.bash_profile :
Code:
source ~/.bashrc

You can google for bash prompt ps1, etc if you want full guides. You can also search these forums and find stuff like https://forums.gentoo.org/viewtopic-p-2504025.html#2504025
_________________
"Mr Thomas Edison has been up on the two previous nights discovering 'a bug' in his phonograph." --Pall Mall Gazette (1889)
Are we THERE yet?
Back to top
View user's profile Send private message
ronmon
Veteran
Veteran


Joined: 15 Apr 2002
Posts: 1043
Location: Key West, FL

PostPosted: Fri Oct 14, 2005 12:11 pm    Post subject: Reply with quote

This site should help.
_________________
Ask Questions the Smart Way - by ESR
Back to top
View user's profile Send private message
daywalkerNT
n00b
n00b


Joined: 01 Oct 2005
Posts: 40

PostPosted: Wed Oct 19, 2005 3:04 pm    Post subject: Reply with quote

neat site ronmon !
Back to top
View user's profile Send private message
Earthwings
Bodhisattva
Bodhisattva


Joined: 14 Apr 2003
Posts: 7753
Location: Karlsruhe, Germany

PostPosted: Wed Oct 19, 2005 3:11 pm    Post subject: Reply with quote

Moved to Dups in favour of Extra informative Bash prompt
_________________
KDE
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Duplicate Threads All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum