kevinlawler / kona

Open-source implementation of the K programming language
ISC License
1.36k stars 138 forks source link

navigation, command memory #517

Closed carkat closed 6 years ago

carkat commented 6 years ago

Using arrow keys, I cannot perform command recall. I'm unable to find any information about command recall in the \ help menu. If there is a way to do command recall, please let me know. Otherwise, let this be a feature request.

In the repl, up arrow should navigate through previously executed commands.

tavmem commented 6 years ago

If you are on Linux, then if you use the "readline wrapper", you get command recall using the arrow keys.

$ rlwrap ./k
kona      \ for help. \\ to exit.

If kona teminates abnormally, you will get error messages from both kona and the wrapper. To suppress abort messages from the wrapper, it is better to use the -n option.

$ rlwrap -n ./k
kona      \ for help. \\ to exit.

If you are on Windows, you don't need to use any wrapper. You automatically get command recall using the arrow keys.

I don't have my OSX system with me today, but I'm pretty sure that you need to use the "readline wrapper" to get command recall.