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
System: Windows 10 (have not tried on Linux yet).
Terminal: Windows Terminal set to Command Prompt.
When using @click.option with a prompt, the command prompt appears to interweave with the running program.
Also occurs when using click.prompt() or rich's Prompt.ask() inside of the function definition.
Will cause the command prompt (such as "(venv) C:\py>") to be displayed throughout click prompts while program is running.
Sometimes will treat response to prompt as if trying to run a system command, sometimes will accept prompt input from the command prompt when the click prompt is not the active display.
As an example, the attached screenshot shows one run of a program through trogon, asking for 2 prompt inputs (a staff name, and an email address). The greenish-yellow squares show the command prompt appearing inside of the running trogon program.
No such problems occur when directly running the click program without trogon. No issues occur if provide the option values in trogon and/or bypass prompts inside program. Have tried on several different functions.
EDIT:
Minimal viable product:
mvp.py:
import click
from trogon import tui
@tui()
@click.group()
def cli():
pass
@click.command()
@click.option('--name', prompt="Name")
def minimal(name):
"""Prompt for a name."""
pass
cli.add_command(minimal)
if __name__ == '__main__':
cli()
I haven't been able to reproduce this on MacOS - so it may be a Windows issue.
That was all from my work computer.
Just tried on windows 10 on home computer and experienced all the same issues.
Tried from a Linux install and all the problems disappeared.
Can confirm it appears to be a Windows issue.
Edit: all windows attempts were after pip installing . Using Windows Terminal from the windows store (with windows terminal set to use command prompt. I did not attempt using PowerShell)
I'm getting same issue on Windows 10 with command line prompt run both as CMD and in Windows terminal.
I've checked in Powershell too and this behavior completely freezez the PS.
System: Windows 10 (have not tried on Linux yet).
Terminal: Windows Terminal set to Command Prompt.
When using @click.option with a prompt, the command prompt appears to interweave with the running program.
Also occurs when using click.prompt() or rich's Prompt.ask() inside of the function definition.
Will cause the command prompt (such as "(venv) C:\py>") to be displayed throughout click prompts while program is running.
Sometimes will treat response to prompt as if trying to run a system command, sometimes will accept prompt input from the command prompt when the click prompt is not the active display.
As an example, the attached screenshot shows one run of a program through trogon, asking for 2 prompt inputs (a staff name, and an email address). The greenish-yellow squares show the command prompt appearing inside of the running trogon program.
No such problems occur when directly running the click program without trogon. No issues occur if provide the option values in trogon and/or bypass prompts inside program. Have tried on several different functions.
EDIT:
Minimal viable product:
mvp.py:
setup.py:
Example application run:
The text was updated successfully, but these errors were encountered: