Last active
August 13, 2021 21:55
-
-
Save e13h/7305b061aa3aea5a57bd44c8eca3731a to your computer and use it in GitHub Desktop.
Zsh run commands that I use
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
# 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