This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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...

@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'


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]