-
-
Notifications
You must be signed in to change notification settings - Fork 853
Open
Labels
bugSomething isn't workingSomething isn't workingos / windowsRelated to WindowsRelated to Windowsshell / bash
Description
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.pywith:
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()- Call it with:
typer main.py run <TAB><TAB>- It outputs:
goodbye^M hello
- But I expected it to output:
goodbye hello
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingos / windowsRelated to WindowsRelated to Windowsshell / bash