This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [python] [patch] set/show extended-prompt
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'