proper use of pretty_commands and exit cleanly