On Sunday, 10 April 2016 at 00:47:28 UTC, Puming wrote:
3. when hiting 'vim a.file' on the command, things go messy.
Have you got these interactive commands work in dexpect?
It is surely capturing exactly what vim sends to a terminal,
which is primarily a series of control sequences to draw the
screen, move the cursor, color it, etc.
You might want to watch for those and just forward them directly
to the user terminal... but this is getting kinda wild....
1. Fully proxy for a bash shell.
2. Result data are separated for each command. So I can easily
search for hitorical sent commands or results.
What you probably want to do is just send one command at a time
to the bash process and handle the rest yourself.
Or just forget bash and write your own shell.