-
Notifications
You must be signed in to change notification settings - Fork 283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ANSI sequences in completions additionally escaped #368
Comments
Thanks for the details - made it easy to quickly set up a repro. You are correct that it is because |
I'd love to be able to colorize parser's table output, for example to differentiate between arguments and flags or to indicate importance. |
👍 |
I think really we want it to parse the command line while drawing it, and apply colors while drawing (rather than embedding colors in the command line). That way it also can color recognized flags and arguments even if they were entered manually. That's what I'm planning to eventually implement in the chrisant996/clink fork, but there's a lot of other work that needs to happen first. |
When I adding ANSI codes to completions using
clink.match_display_filter
the output looks broken. Consider an example of running the following code (wherecolor_text
is a function that just prepends text with corresponding ANSI code):Expected: completions should be colored
Actual: the result of typing
test {TAB}
looks broken:The issue repros in both clean Clink and ConEmu + Clink.
After some investigation it seems that the reason of such behaviour is Readlines
fnprint
function, which performs an additional escaping of ANSI codes in lines 735-744Not sure whether this is a bug or a feature (and if feature - what is the use case for it), but it would be great if there was an option to avoid this Readline's behaviour.
The text was updated successfully, but these errors were encountered: