You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 ?
The text was updated successfully, but these errors were encountered:
Here is one possible option to do that. Wonder if there are better ways?
importosfromprompt_toolkitimportPromptSessiondefprompt(**kwargs):
session=PromptSession(**kwargs)
ifos.environ.get('AWS_EXECUTION_ENV') =='CloudShell':
session.app.paste_mode=lambda: True# avoid auto-indent in CloudShellreturnsession.prompt()
iakov-aws
changed the title
Indent behaviour is different in terminal and AWS CloudShell
Indent behaviour on paste is different in terminal and AWS CloudShell
Aug 19, 2024
Hello,
I notice a difference in behavior of following code in terminal win/macos/linux vs AWS CloudShell.
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 ?
The text was updated successfully, but these errors were encountered: