On 8 November 2010 02:23, Adrien Piérard pierarda@iro.umontreal.ca wrote:
2010/11/7 Michele Zaffalon michele.zaffalon@gmail.com:
Hi all,
Hi Michele
I am using Gambit from the terminal: is it it possible to change the terminal behaviour so that if you type a partial word and hit up arrow, the terminal tries to complete it with a command from the past command history that matches the partial word, not just with the last command?
This behaviour is, as far as I know, not very common. Most pervasive completion systems are based on the readline library, which Gambit reimplemented if I remember correctly. So, <up> will always give you the previous command in history (though some of us believe that the previous S-exp would be better). In your case, what you want is to use <tab>, form completion. And this works well.
Readline implements incremental search with C-r, which works like the OP describes (C-r, then start typing to match against history), so rlwrap can be useful for dealing with prompts that don't provide any such functionality (I use it with sqlite3's repl). Gambit doesn't respond to C-r, on my system anyway, but it might be easy enough to implement a similar incremental search?