Created
November 17, 2014 19:35
-
-
Save ssbb/b0bae44912b83e87b104 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function prompt_sorin_pwd { | |
local pwd="${PWD/#$HOME/~}" | |
if [[ "$pwd" == (#m)[/~] ]]; then | |
_prompt_sorin_pwd="$MATCH" | |
unset MATCH | |
else | |
_prompt_sorin_pwd="${${${${(@j:/:M)${(@s:/:)pwd}##.#?}:h}%/}//\%/%%}/${${pwd:t}//\%/%%}" | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment