Describe the bug
Somewhere along the line it seems an \r gets introduced between the available options in git bash on windows. This is also the case for MSYS2. Seems not to be for zsh under msys2.
To Reproduce
Steps to reproduce the behavior with a minimum self-contained file.
Replace each part with your own scenario:
- Create a file
main.py with:
import typer
app = typer.Typer()
@app.command()
def hello(name: str):
typer.echo(f"Hello {name}")
@app.command()
def goodbye(name: str):
typer.echo(f"Goodbye {name}")
if __name__ == "__main__":
app()
typer main.py run <TAB><TAB>
- But I expected it to output:
Expected behavior
I do not expect extra carriage returns to appear as control characters
Environment
- OS: Windows
- Typer Version 0.3.2
- Python version 3.8.3
Additional context
Operates normally when APP_COMPLETE=complete_bash $1 ) is changed to APP_COMPLETE=complete_bash $1 | tr -d '\r' ) in the completion file, but this is probably not a good fix.
Describe the bug
Somewhere along the line it seems an \r gets introduced between the available options in git bash on windows. This is also the case for MSYS2. Seems not to be for zsh under msys2.
To Reproduce
Steps to reproduce the behavior with a minimum self-contained file.
Replace each part with your own scenario:
main.pywith:Expected behavior
I do not expect extra carriage returns to appear as control characters
Environment
Additional context
Operates normally when
APP_COMPLETE=complete_bash $1 )is changed toAPP_COMPLETE=complete_bash $1 | tr -d '\r' )in the completion file, but this is probably not a good fix.