Last Updated: February 25, 2016
·
483
· haad

Nice zsh feature Netsted expansions

${${ACCOUNT#@}%:}

This removes everything before @ and everything after : from string so

john@localhost:123456 will produce localhost