[Top][All Lists]

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

Re: bash strangeness with utf-8

From: Giraud
Subject: Re: bash strangeness with utf-8
Date: Sun, 08 Jul 2007 20:40:23 -0600
User-agent: Thunderbird (X11/20070616)

Hmm, interesting.  I thought that using "env | grep PROM" would show
PROMPT_COMMAND's value, but I guess not.  Yes, I do have PROMPT_COMMAND
set, it appears.  However, if I unset it (and even also 'export PS1="foo
"' to set PS1 to a simple string), the problem remains.

How best to debug this?  tcsh and sh do not exhibit the problem, and it
only seems to happen on Gentoo/FreeBSD (not Linux).


Benno Schulenberg wrote:
> Giraud wrote:
>> The following prompt is set in my .bashrc (but the same behavior
>> happens if I do not set it or set it to a simple string, so I
>> don't think this matters):
>>      PS1="\[\033[33m\]\h-\u\[\033[36m\] [\w] (\!)\[\033[00m\] "
>> PROMPT_COMMAND is not set.
> Look at your typescript with vim.  You'll see this gets printed:
>    ^[]0;address@hidden:~^G^[[?1034h
> before your prompt is printed:
>    ^[[33mcrater-joe^[[36m [~] (500)^[[00m 
> Where is that first string coming from if not from PROMPT_COMMAND?  
> It looks suspiciously similar to what Gentoo sets as prompt command 
> in /etc/bash/bashrc.  :)  Except for this "^[[?1034h" at the end.
> Where is that coming from?  It does strange things with the width of 
> the terminal when I add it here to PS1.  So when you get rid of it, 
> things might work correctly again.
> Benno

reply via email to

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