more efficient path parsing

* no call to sed
* use of the "\w" for bash default value when path shorting is desactivated