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


Click here to return to the 'two-line prompt' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
two-line prompt
Authored by: snoozer on Dec 22, '01 01:18:17PM
I split my bash prompt across two lines (actually three, if you count the blank spacer). This sacrifices some vertical screen space in order to see all the information I want. These days terminal windows are resizable and have scrollbars, so it's not like I have to cram as much as I can into an 80x25 screen. Here's my prompt:
export PS1="n[w]n#: "
It produces results like this:
[~/Documents/programming] 5: cd FlipViewApp [~/Documents/programming/FlipViewApp] 6:
So I get a complete path name *and* plenty of space to type commands. If you've enabled your root account (as I have), you can replace the ":" with a "#" in root's bash prompt. This way you can always tell at a glance whether you're su'ed. (Note: for some reason the root account wants to use .bashrc whereas my regular user account wants to use .bash_profile. No idea why.) --Andy

[ Reply to This | # ]
$TERMINUS
Authored by: snoozer on Dec 22, '01 01:23:25PM

Oops -- dlandrith, I didn't see your $TERMINUS trick. That's what I should do.

--Andy



[ Reply to This | # ]