Refined pretty-printing in shell-mode. #5