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
spawn_bash assumes you're spawning a new terminal on the same machine running rexpect. I use pexpect to write integration tests for embedded targets and pxssh is really useful. Having the fairly robust ssh login stuff for starters, but also not assuming the login shell is necessarily bash while still providing reliable synchronization and resetting the prompt (i.e. set PS1 but don't try to load .profile or anything)
The text was updated successfully, but these errors were encountered:
Yeah I think this and #69 are about providing a more "batteries includes" experience for using rexpect to drive integration testing. I split them in two because this one is more about how you connect/open a process, whereas #69 is about providing helpful functions once the process is already opened. so off the top of my head useful features I know I relied on heavily in pexpect that would be nice to match:
port over pxssh login function
fdpexpect or similar where you can pass an open file descriptor (useful for building serial connection layer)
separate out syncing the shell prompt from spawn_bash() into into its own function prompt_sync() that can be easily used with other shells, not just bash. in pexpect replwrap you can override the command to start the shell and it doesn't try to do anything fancy like load the profile or anything.
just looking at the code for spawn_bash() I think it can be simplified a lot by passing bash -l option instead of manually looking for rcfiles etc.
spawn_bash
assumes you're spawning a new terminal on the same machine running rexpect. I use pexpect to write integration tests for embedded targets andpxssh
is really useful. Having the fairly robust ssh login stuff for starters, but also not assuming the login shell is necessarilybash
while still providing reliable synchronization and resetting the prompt (i.e. set PS1 but don't try to load .profile or anything)The text was updated successfully, but these errors were encountered: