prompt-toolkit / prompt-toolkit/python-prompt-toolkit
Indent behaviour on paste is different in terminal and AWS CloudShell
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 10.6k
- Forks
- 815
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
I notice a difference in behavior of following code in terminal win/macos/linux vs AWS CloudShell.
from prompt_toolkit import prompt
answer = prompt( "Multiline input: >\", multiline=True)
print(answer)
In AWS CloudShell the text pasted is
In other terminals paste works as expected
As per doc multi-line activates indent mode and it works fine. But on AWS CloudShell paste works combined with indent but with other terminals it works some other way not indenting the pasted input.
Most likely prompt-toolkit detects paste action but in AWS CloudShell the paste mechanism is not detectable(?).
Is there a way to deactivate auto indent on multi-line mode any other way to make paste work on AWS CloudShell ?
Contributor guide
No contributing guide indexed for this repository
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.
Research direction
Reproduce the multiline paste behavior in AWS CloudShell and in the other terminals described in the report. Then trace prompt-toolkit's multiline input and paste handling to determine why indentation differs; done means the behavior is corrected or a documented way to control auto-indent is provided.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100