Re: Strange behavior with PS1 prompt

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 17Oct2009 21:16, Todd Zullinger <tmz@xxxxxxxxx> wrote:
| I don't think this is a bug.  Rather, I think the problem is caused by
| not escaping the color codes you have embedded in your prompt.  Try
| this instead:
| 
| export PS1="\n\[\033[0;35m\][\u@\h] ${PWD}\n$\[\033[0m\]"
| 
| The \[ and \] begin and end a series of non-printable characters.
| This tells bash not to count those characters when determining the
| length of the prompt.  So the color escape sequences are wrapped in \[
| and \].

This is all beautiful, but I think you need to use single quotes instead
of doubles.
-- 
Cameron Simpson <cs@xxxxxxxxxx> DoD#743
http://www.cskk.ezoshosting.com/cs/

The number of cylinders for this disk is set to 364737.
There is nothing wrong with that, but this is larger than 1024, [...]
- fdisk on our new RAID 07oct2007 :-)

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux