Backspace not working for scala prompt in Cygwin


I am using Cygwin64 on Windows 10 to work on Scala but backspace doesn’t work on Scala prompt. I tried backspace on Scala on Windows command prompt it works fine.

Is there any setup I need to do to use in Cygwin to get the backspace work?