[Lldb-commits] [lldb] [lldb] Add a setting to customize the prompt color (PR #66218)
Jim Ingham via lldb-commits
lldb-commits at lists.llvm.org
Wed Sep 13 11:16:43 PDT 2023
We actually have several requests for this internally, and I think that's a good idea.
However, some of the format tokens can return arbitrary text, including newlines, for instance "thread.completed-expression", and all the "script." ones. Do we want to try to support prompts with new-lines or do we want to restrict the format string for prompts or somehow cut off these arbitrary elements at the first new-line?
Jim
> On Sep 13, 2023, at 9:53 AM, Greg Clayton via lldb-commits <lldb-commits at lists.llvm.org> wrote:
>
>
> https://github.com/clayborg commented:
>
> Any interest in just allowing "settings set prompt" to use the format strings approach that we support in thread-format, frame-format? I see we have a ton of settings that already ansi-prefix and ansi-suffix settings, but it would be easy to just do:
> ```
> (lldb) setting set prompt "${ansi.fg.red}(lldb) ${ansi.normal}"
> ```
> It we didn't just expand the above string one time, we could be able to make some really powerful LLDB prompts if we used the format strings:
> ```
> (lldb) setting set prompt "{pid = ${process.id} }{tid = ${thread.id%tid}} ${ansi.fg.red}(lldb) ${ansi.normal}"
> ```
> Just an idea, not a requirement for this patch
>
> https://github.com/llvm/llvm-project/pull/66218
> _______________________________________________
> lldb-commits mailing list
> lldb-commits at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
More information about the lldb-commits
mailing list