Refactor function.
Add function to test if we are under screen or tmux.
Assign distinct prompt ok/fail chars if we are under screen/tmux.