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:
alias mosml="rlwrap mosml"
(Substitute mosml
for the name of your SML interpreter.)
Consider using the program ledit. It allows you to use the arrow keys to visit previous commands.
Example:
ledit mosml
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With