diff --git a/functions.sh b/functions.sh index b8fbe93..1066442 100755 --- a/functions.sh +++ b/functions.sh @@ -232,6 +232,7 @@ function pipupdate(){ done } +# unzip file to directory with the same name of the zip file (without extension) function unzipd { zip_file="$1" filename=$(basename -- "$zip_file") @@ -240,6 +241,12 @@ function unzipd { unzip -d "$name" "$zip_file" } +# remove local branches which have been merged into master +function git_prune_branches(){ + git branch --merged master | grep -v '^[ * ]*master$' | xargs git branch -d +} + + # dotfiles user functions if [[ -f $HOME/.dotfiles_functions ]]; then source "$HOME/.dotfiles_functions"