Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Implementing Tip in bash' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Implementing Tip in bash
Authored by: cmccarthy on Oct 02, '02 03:58:44PM

If you're using bash instead of tcsh as your shell, the following line, entered as a command, has the same effect:

export PS1='\u@\H: \w\n[\!] '

Add this line to the .bashrc file in your home directory to have the prompt stay this way.



[ Reply to This | # ]
Implementing Tip in bash
Authored by: jldera on Oct 03, '02 08:45:00AM

This would work.... as long as you had a non-login session when you opened a shell in Terminal. If you've ever noticed though, the shells are a login session by default.. You have to either a) put that in .bash_profile or b) create a .bash_profile that contains the following:

. ~/.bashrc

I recommend (b) because you can work with just .bashrc for all shell sessions; without having to worry about which type of session you're changing.



[ Reply to This | # ]