Running Windows 10. Just installed Cygwin, running it in Windows Terminal, tried to change the prompt format by editing PS1 variable and exporting in .bashrc and .bash_profile:
alias vim='nvim'
alias c='clear'
alias l='ls -altr'
export PS1='[\u \W]$ '
But Cygwin adds a carriage return at the end of the prompt, so the cursor always starts at the first column not at the end of the prompt. Get this error when sourcing .bash_profile
bash: $'\r': command not found
The carriage return does not get added when manually executing export PS1='[\u \W]$ ' as a command.
When running c as defined in .bash_profile:
bash: $'clear\r': command not found
When running l:
ls: unknown option --
Try 'ls --help' for more information.
When running vim (alias):
bash: $'nvim\r': command not found
Same thing happens in the Cygwin terminal app.