Better expression for ~ and $HOME substitution
Better expression for ~ and $HOME substitution

It’s cleaner and it doesn’t show this bug:

echo $PWD; and printf $PWD  | sed "s/"(echo "$HOME" | sed
's/\//\\\\\//g')"/~/"
/Volumes/Macintosh
HDD/Users/carmine/Dropbox/Code/external/powerline-shell
/Volumes/Macintosh HDD~/Dropbox/Code/external/powerline-shell

jerr0328/fishline,jmwatte/fishline,crmne/fishline,0rax/fishline