Skip to content

Commit

Permalink
Add PROMPT_TOOLKIT_NO_CPR=1 environment variable to disable CPR requests
Browse files Browse the repository at this point in the history
  • Loading branch information
asmeurer authored and jonathanslenders committed May 14, 2019
1 parent 1cd47b1 commit 74ef692
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions prompt_toolkit/input/vt100.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ def __init__(self, stdin):
def responds_to_cpr(self):
# When the input is a tty, we assume that CPR is supported.
# It's not when the input is piped from Pexpect.
if os.environ.get('PROMPT_TOOLKIT_NO_CPR', '') == '1':
return False
return self.stdin.isatty()

def attach(self, input_ready_callback):
Expand Down

0 comments on commit 74ef692

Please sign in to comment.