ANSI.format lets a C1 CSI set a color
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
Research direction
Start by locating ansi_escape and the ANSI.format and % handling paths mentioned in the issue. Reproduce both cases with C1 CSI input, then verify that template control sequences retain their intended color while argument values render with ? in place of the escape sequence and cannot set a color.
Written by the indexing model from the issue text.
Description
ANSI("x{}").format("\x9b31mRED") returns RED in ansired. The same value with % does it too.
\x1b[31mRED is already turned into a question mark. \x9b is the C1 form of ESC [, and ansi_escape only replaces \x1b and backspace.
ANSI("\x9b32mOK") in the template should stay green. An argument should come back as ?31mRED with no color.
- Dominant language
- Python
- Stars
- 10.6k
- Forks
- 819
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from prompt-toolkit/python-prompt-toolkit
-
Add CSharp Console to PROJECTS.rstPossibly taken @jw9829 claimed this 8 days ago. Open
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
Document.translate_row_col_to_index does not clamp negative rows to zeroPossibly taken @oodadoudou claimed this 23 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Modified arrow keys resolve to the opposite direction: ESC[1;6A is Ctrl+Shift+Up but maps to ControlShiftDown (10 entries)Possibly taken @despotak claimed this 29 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
-
TelnetServer recv error: Forcing an RST request to the telnet server can cause a crashPossibly taken @liyimil claimed this 79 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
prompt-toolkit/python-prompt-toolkit#2073 · 2 comments ·
-
Difficulty 1/5 Under an hour Newbie friendliness 65/100
All issues in prompt-toolkit/python-prompt-toolkit
Similar issues
-
needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
json_params_matcher fails on falsy top-level JSON primitives (0, False, "")Possibly taken @mayureshsonawane17 claimed this today. OpenWaiting for: Product Owner
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 5 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
Add .devin pluginOpen
Difficulty 1/5 Under an hour Newbie friendliness 88/100
ayghri/i-have-adhd#249 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
modelscope/FunASR#3762 ·
Maintainers usually reply within 1 day