When I press Enter or Backspace in the terminal, I get this:
Would you like to create one now? (yes/no): no^M^?^?^?^?^?^?^?^M^?^?
What's up with this?
When I press Enter or Backspace in the terminal, I get this:
Would you like to create one now? (yes/no): no^M^?^?^?^?^?^?^?^M^?^?
What's up with this?
This happens because the program that reads the user input can't handle special characters. The terminal is in raw mode. If the program is a script you can use
read -e
to use the Bashreadline
function that can handle special characters.