Skip to content

Instantly share code, notes, and snippets.

@e13h
Last active August 13, 2021 21:55
Show Gist options
  • Save e13h/7305b061aa3aea5a57bd44c8eca3731a to your computer and use it in GitHub Desktop.
Save e13h/7305b061aa3aea5a57bd44c8eca3731a to your computer and use it in GitHub Desktop.
Zsh run commands that I use
# See `SIMPLE PROMPT ESCAPES' section in the zshmisc man page for details
# on what these prompt escapes do and to further customize your zsh prompt
export PS1="%n@%m %1~ %# "
# Delete branches that have been merged and have been deleted from remote.
git-remove-untracked() {
git fetch --prune > /dev/null 2>&1 \
&& git branch -r \
| awk '{print $1}' \
| egrep -v -f /dev/fd/0 <(git branch -vv | grep origin) \
| awk '{print $1}' \
| xargs git branch -d
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment