Yeah, you can reuse or rewrite jline, which is the real purpose of that library ;-) It does implement Ctrl+R amongst other things, so there should be no problem to intercept those if you want. Fwiw, key bindings depends on bash configuration, so you need to read the ~/.inputrc to read the correct bindings.
On Thu, Jan 24, 2013 at 2:21 PM, Ioan Eugen Stan <[email protected]>wrote: > Hello Guillaume, > > The idea is to mimic a real shell experience to fool the attacker into > thinking he's on a real shell. This kind of excludes implementing a > delegate for each command. > > I'll try to trigger completion myself. By the way, I think the biggest > issue is to mimic/register all the character codes that the shell > (bash in this case) has like Meta /, or Ctrl R for reverse search. > This is to make the experience very similar. > > Take for example: insert-completions built-in [1] triggered by > pressing (M-*) . > > Any ideas how I can intercept characters codes generated wit Control > or Meta and react to them? > > Thanks, > > [1] > http://www.gnu.org/software/bash/manual/bashref.html#Commands-For-Completion > > Thanks, > -- > Ioan Eugen Stan / CTO / http://axemblr.com > -- ------------------------ Guillaume Nodet ------------------------ Blog: http://gnodet.blogspot.com/ ------------------------ FuseSource, Integration everywhere http://fusesource.com
