[PLUG] bash prompt

Tyler F. Creelan creelan at engr.orst.edu
Fri Oct 25 16:25:43 UTC 2002


> Is it possible to set up a bash prompt that has a line feed?  Mine shows
> the path, which I want, but when long commands wrap it gets ugly.
> Just wondering.

Does this mean you have the path and $ on the same line, causing the
commands to wrap around on long paths? If so, have you tried splitting the
$ and path into two lines? If you have a problem with the path getting too
long and wrapping around on the first line, here's some code to
dynamically resize it:

"11.10. Controlling the Size and Appearance of $PWD"
"Bash Prompt HOWTO"
http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/x768.html

Even cooler, here is some code to dynamically resize the path according to
the size of your terminal:

"12.7 A Prompt the Width of Your Term"
http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/x848.html

HTH,

Tyler



On Fri, 25 Oct 2002, Michael Montagne wrote:

> Is it possible to set up a bash prompt that has a line feed?  Mine shows
> the path, which I want, but when long commands wrap it gets ugly.
> Just wondering.
>
> --
>   Michael Montagne  [montagne at boora.com]   503.226.1575
> --
>
> _______________________________________________
> PLUG mailing list
> PLUG at lists.pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
>





More information about the PLUG mailing list