Question

I'm running mit-scheme-x86-64 and reading SICP.

For some reason the up and down arrows don't behave like they do in terminal/in every other interpreter.

They send ^[[A and ^[[B respectively.

I tried doing this in my .bashrc and it didn't work.

bind '"^[[A":history-search-backward'
bind '"^[[B":history-search-forward'

I'm actually not quite sure what I'm suppose to do.

Was it helpful?

Solution

Try to use rlwrap for these purposes:

rlwrap runs the specified command, intercepting user input in order to provide readline’s line editing, persistent history and completion.

rlwrap tries to be completely transparent − you (or your shell) shouldn’t notice any difference between command and rlwrap command − except the added readline functionality, of course. This should even hold true when you are re−directing, piping and sending signals from and to command, or when command manipulates its terminal settings.

There are many options to add (programmable) completion, handle multi−line input, colour and re−write prompts. If you don’t need them (and you probably don’t), you can skip the rest of this manpage.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top