View previous topic :: View next topic |
Author |
Message |
IcEonFirE Apprentice
Joined: 15 Aug 2004 Posts: 174
|
Posted: Sun Sep 25, 2005 9:27 pm Post subject: Bash Prompt structure |
|
|
HI
I have red some documentation about bash but I still have something I'd like to change a thing;
the prompt is shown like theis [user@hostname ~] i would like to be able of displaying the home directory instead of the
~.
Any idea please ?
Thanks
IcEonFirE |
|
Back to top |
|
|
dgaffuri Advocate
Joined: 05 Jun 2005 Posts: 2078 Location: Italy
|
|
Back to top |
|
|
IcEonFirE Apprentice
Joined: 15 Aug 2004 Posts: 174
|
Posted: Tue Sep 27, 2005 3:15 am Post subject: |
|
|
Hi
Thanks fo replying but I still got the ~ instead of the current directory. and besides I have discovered another anomalie while i logged in to serial console i prompt color became in white instead of green and blue
any idea please? |
|
Back to top |
|
|
Genone Retired Dev
Joined: 14 Mar 2003 Posts: 9538 Location: beyond the rim
|
Posted: Wed Sep 28, 2005 5:48 am Post subject: |
|
|
IcEonFirE wrote: | Hi
Thanks fo replying but I still got the ~ instead of the current directory. and besides I have discovered another anomalie while i logged in to serial console i prompt color became in white instead of green and blue
any idea please? |
Well, the bash info pages don't provide an option to show $HOME as a normal dir in the prompt, so it's probably not possible with the normal $PSx vars, however it's possible to get what you want by using PROMPT_COMMAND="pwd", but I really wouldn't recommend it.
As for the other issue, serial consoles generally don't support colors AFAIK. |
|
Back to top |
|
|
alok_singhal n00b
Joined: 22 Apr 2003 Posts: 61
|
Posted: Wed Sep 28, 2005 6:02 am Post subject: |
|
|
Code: | export PS1='$PWD: \$ ' |
|
|
Back to top |
|
|
|