restore previous input after playing commands into the console