Nice zsh feature Netsted expansions
${${ACCOUNT#@}%:}
This removes everything before @ and everything after : from string so
john@localhost:123456 will produce localhost
Written by Adam Hamsik
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Zsh
Authors
Related Tags
#zsh
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#