Fix character counting issues in bash prompt