Clean output code

I notice how Mosh has clean output code where as mine looks like a big mess with the folder p ath etc. how can I fix this?