help-bash
[Top][All Lists]
Advanced

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

Re: [Help-bash] Unicode characters in PS1 : line wrapping


From: Chet Ramey
Subject: Re: [Help-bash] Unicode characters in PS1 : line wrapping
Date: Wed, 20 May 2015 21:51:07 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

On 5/13/15 9:03 AM, Florent B wrote:
> Hi everyone,
> 
> I have a problem customizing my PS1 variable on Debian 7 Wheezy (bash
> 4.2.37(1)-release).
> 
> If I set my PS1 to this :
> 
> PS1="\[\033[01;37m\]\$? \$(if [[ \$? == 0 ]]; then echo
> \"\[\033[01;32m\]\342\234\223\"; else echo
> \"\[\033[01;31m\]\342\234\227\"; fi) $(if [[ ${EUID} == 0 ]]; then echo
> '\[\033[01;31m\]\h'; else echo '\[\033[01;address@hidden';
> fi)\[\033[01;34m\] \w \$\[\033[00m\] "
> 
> I have line wrapping problems for large commands that overwrite the
> first line.

I can't reproduce this on bash-4.3.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]