July 25, 2014 Linux Bash, Linux, Tricks
This is a nifty way of showing the current directory with $HOME abbreviated to ~:
$HOME
~
"${PWD/#$HOME/~}"
Nice!
(Find more bash string manipulation here)
Save my name, email, and website in this browser for the next time I comment.
code
more code
Quote
code
more code
~~~~