This is an archive of the discontinued LLVM Phabricator instance.

[lldb] Add a setting to change the autosuggestion ANSI escape codes
ClosedPublic

Authored by JDevlieghere on Mar 5 2022, 7:11 PM.

Details

Summary

I'm a big fan of the autosuggestion feature but my terminal/color scheme doesn't display faint any differently than regular lldb output, which makes the feature a little confusing. This patch add a setting to change the autosuggestion ANSI escape codes.

For example, to display the autosuggestion in italic, you can add this to your ~/.lldbinit

settings set show-autosuggestion-ansi-prefix ${ansi.italic}
setting set show-autosuggestion-ansi-suffix ${ansi.normal}

Diff Detail

Event Timeline

JDevlieghere created this revision.Mar 5 2022, 7:11 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 5 2022, 7:11 PM
JDevlieghere requested review of this revision.Mar 5 2022, 7:11 PM
teemperor accepted this revision.Mar 6 2022, 11:18 PM

LGTM, thanks! FWIW, if you have fish installed you might wanna check what they are doing on your terminal for its autosuggestions (and we might wanna steal their default, even though I thought this was 'faint').

This revision is now accepted and ready to land.Mar 6 2022, 11:18 PM
This revision was landed with ongoing or failed builds.Mar 7 2022, 8:55 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptMar 7 2022, 8:55 AM

LGTM, thanks! FWIW, if you have fish installed you might wanna check what they are doing on your terminal for its autosuggestions (and we might wanna steal their default, even though I thought this was 'faint').

That's exactly what I did. Fish is using bright yellow, which is something we don't support yet, which is why I've put up https://reviews.llvm.org/D121131