Some application e.g. Eclipse prolog, or other command line application echo "^[[A" when pressing the up arrow key. Similarly, it doesn't give expected behaviour for the other arrow keys either(^[[B, ^[[C, ^[[D).
What's happening here and how do I correct this behaviour?
 Okay I fixed it, I installed rlwrap and called