This is a nifty way of showing the current directory with $HOME
abbreviated to ~
:
"${PWD/#$HOME/~}"
Nice!
(Find more bash string manipulation here)
July 25, 2014 Linux No comments Bash, Linux, Tricks
This is a nifty way of showing the current directory with $HOME
abbreviated to ~
:
"${PWD/#$HOME/~}"
Nice!
(Find more bash string manipulation here)