Simplified unwanted tilde expansion handling

The idea comes from https://github.com/edkolev/promptline.vim/pull/11