aws / aws/aws-cli

aws_completer outputs "^M" after every suggestion in MINGW(64) on Windows Terminal

Open
#9,135 5 comments 0 reactions 0 assignees View on GitHub
bug p3
Dominant language
Python
Stars
17.3k
Forks
4.6k
Avg merge
1d 2h
Merged PRs (30d)
13

Description

### Describe the bug

Attempting to use Windows version `aws_completer` for bash completion in MINGW64 results in the output containing `^M` characters after every suggestion.

### Regression Issue

- [ ] Select this option if this issue appears to be a regression.

### Expected Behavior

Output should not contain `^M` after every suggestion.

### Current Behavior

Output contains `^M` after every suggestion.
![image](https://github.com/user-attachments/assets/68849289-6b59-4716-8c37-78a565cb07a8)

### Reproduction Steps

1. Have the Windows version of AWS CLI installed
2. Open a Windows Terminal of Git Bash (MINGW64)
3. Run `complete -C "/c/Program\ Files/Amazon/AWSCLIV2/aws_completer" aws
4. Type `aws e[TAB]`

### Possible Solution

_No response_

### Additional Information/Context

I'm currently using the Git Bash implementation of MINGW64 in Windows Terminal which is my default command line processor. I have not tried using any other alternative terminal so I don't know if this behavior is global or limited to just Windows Terminal.

### CLI version used

aws-cli/2.22.14 Python/3.12.6 Windows/11 exe/AMD64

### Environment details (OS name and version, etc.)

Windows 11 Enterprise 23H2 Build 22631.4037 FP 1000.22700.1027.0

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.