tty.js is updated to allow to pass options to configuration function, which will return shell to spawn. Not finished.