Weird characters when pasting in WIndows Terminal #14410

Open
opened 2026-01-31 04:09:33 +00:00 by claunia · 0 comments
Owner

Originally created by @speller on GitHub (Jul 7, 2021).

Windows Terminal version (or Windows build number)

1.8.1521.0, 10.0.21390.2025

Other Software

No response

Steps to reproduce

When I run the following command in Ubuntu 20 from under Windows Terminal:

docker run -ti --name gcloud-config gcr.io/google.com/cloudsdktool/cloud-sdk:alpine gcloud auth login

I'm getting the following input when pasting the key:

Go to the following link in your browser:

    https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=<long URL>

Enter verification code: ^[[200~<real pasted text>^[[201~

The command fails to process this input. I'm pasting the <real pasted text> but it is actually entered enveloped by ^[[200~ and ^[[201~ symbols.

ERROR: gcloud crashed (InvalidGrantError): (invalid_grant) Malformed auth code.

How to fix that?

Expected Behavior

Command works

Actual Behavior

Command fails

Originally created by @speller on GitHub (Jul 7, 2021). ### Windows Terminal version (or Windows build number) 1.8.1521.0, 10.0.21390.2025 ### Other Software _No response_ ### Steps to reproduce When I run the following command in Ubuntu 20 from under Windows Terminal: ``` docker run -ti --name gcloud-config gcr.io/google.com/cloudsdktool/cloud-sdk:alpine gcloud auth login ``` I'm getting the following input when pasting the key: ``` Go to the following link in your browser: https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=<long URL> Enter verification code: ^[[200~<real pasted text>^[[201~ ``` The command fails to process this input. I'm pasting the `<real pasted text>` but it is actually entered enveloped by `^[[200~` and `^[[201~` symbols. ``` ERROR: gcloud crashed (InvalidGrantError): (invalid_grant) Malformed auth code. ``` How to fix that? ### Expected Behavior Command works ### Actual Behavior Command fails
claunia added the Needs-TriageNeeds-Tag-FixResolution-No-Repro labels 2026-01-31 04:09:33 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#14410