You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This should show the bash shell prompt, but it does not.
Typing Ctrl-L will repaint the screen and show the prompt, but not all shells support Ctrl-L (e.g. dash does not), so sending that keystroke is not always a possible workaround.
Not a bug, pexpect does indeed "suppress" up until interact, as this is intended, it doesn't know you would later call interact. If you want to make a PR for adding something about it to the documentation i'll accept it.
Anyway. If you want to see the prompt (and anything else) printed up until the match, just print it:
it has been a very long time since i used the original tcl/expect, but i seem to recall that it implies duplicating all child program output to the parent process: it always duplicates stdout, which is why the tcl/expect version doesn't require printing before interact to "see" what was given up until interact is called
Minimal working example:
This should show the
bash
shell prompt, but it does not.Typing Ctrl-L will repaint the screen and show the prompt, but not all shells support Ctrl-L (e.g.
dash
does not), so sending that keystroke is not always a possible workaround.First brought up here:
https://stackoverflow.com/questions/28860660/pexpect-eats-bash-prompt
The text was updated successfully, but these errors were encountered: