shell interactive mode
clean up code style and add log pretty printer
Merge pull request #1033 from stuartf/interactive

shell interactive mode