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
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.
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.
The text was updated successfully, but these errors were encountered:
I think this is the same as what I'm seeing. It appears to have started with click v8.0.0, if I pin to click v7.1.2 bash completion works as expected.
completion was refactored in click 8. I don't know if issue lies w/ typer or click, but ^M is always injected into the completion.
$ cencli show
^M aps clients dhcp gateways interfaces logs sites tokens vlans wlans
alerts branch config events groups last routes switches upgrade webhooks
all certs devices firmware hook-proxy lldp run templates variables wids
The ^M breaks completion you always have to type the full word.
Again: click v7.1.2 works
click >=8.0.0 exhibits the issue.
Expect this may be an issue with click upstream, but hopefully we can get it sorted out.
There was another impact to click 8.x re completion, and this appears to impact all shells.
I have a ton of custom completion functions, all were setup like this:
prior to click 8 cencli move barn.3 --group <tab><tab> would provide ['move', 'barn.3', '--group'] as args to the completion function.
Since click 8 args is always []
They all show up in the ctx.params (values()), but that's a lot of re-factoring.
@tiangolo do we need to open an issue (may already be one) with click? It was def something in click 8 that causes the behavior, but not sure if it's an issue with typers interaction or if click actually broke completion on bash with click 8?
Same for the args parameter in the completion functions. If click 8 is in use args is always an empty list as described above.
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.py
with: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.The text was updated successfully, but these errors were encountered: