[python] [patch] set/show extended-prompt

Phil Muldoon pmuldoon@redhat.com
Fri Aug 12 14:51:00 GMT 2011


Matt Rice <ratmice@gmail.com> writes:

> On Thu, Aug 11, 2011 at 8:06 AM, Phil Muldoon <pmuldoon@redhat.com> wrote:
>
>> +@item @var{\e}
>> +Substitute an ESC character.
>
>> +def _prompt_esc(attr):
>> +    "The ESC character."
>> +    return '\033'
>
> won't usage of this (without an equivalent to bash's \[ \]) mess up
> the prompt width calculation?
> maybe something like...

Not sure what you mean by width in this context.  I checked strlen and
for /efoo/e and it reported the length at five?

Cheers

Phil

> @item @var{\[}
> Begins a sequence of non-printing characters.
> @item @var{\]}
> Ends a sequence of non-printing characters.
>
> def _prompt_nonprinting_begin(attr):
>    "Begins a sequence of non-printing characters."
>    return '\001'
>
> def _prompt_nonprinting_end(attr):
>    "Ends a sequence of non-printing characters."
>    return '\002'



More information about the Gdb-patches mailing list