bash: prompt: redo the collapsing to work by character instead

This makes the collapse less jumpy and leaves more information.