Re: bash prompt
On Wed, Sep 19, 2001 at 06:33:09PM -0400, Timothy H. Keitt wrote:
| Quick question: the following bash prompt puts the current machine name
| in the xterm (gnome-terminal) title bar, but also causes long lines to
| wrap incorrectly. Instead of moving down a line, the wrap over-writes
| the existing line of text. Anyone have a solution? Here's the prompt
| string:
|
| \e]0;\h\007\u@\h:\w\$
Hmm, I don't see where you have a line wrap here. I do know that (at
least with some terminals, etc) a "line wrap" is achieved by printing
both a CR and NL (similar to what typewriters used to do). I have a
multi-line bash prompt like thus :
-------------
# set the prompt
PS1="
(\w)
\u@\h [\!]\\$ "
-------------
I simply include the lines in the string in my .bashrc.
HTH,
-D
Reply to:
- References:
- bash prompt
- From: "Timothy H. Keitt" <Timothy.Keitt@StonyBrook.Edu>