I am learning standard ML using its interpreter. Sometimes I make typo and just want to repeat the previous command like in Linux shell. However, up arrow will end up with printing special characters on the screen. Sometimes I want to go back left to correct something, left arrow also results in printing special characters.
Does anybody know what is the correct way to do them?
I use Moscow ML, but I figure the answer will apply to whichever version you use:
You can achieve what you want by using
rlwrap.I have the following alias set in my
.zshrc, which handles it automatically:(Substitute
mosmlfor the name of your SML interpreter.)