#!/bin/sh if [ -z "$1" ]; then echo 'usage: git del-branches ""' else git branch --list "$1" | sed 's/^* //' | xargs -r git branch -d fi