Skip to content

Commit

Permalink
egrep
Browse files Browse the repository at this point in the history
  • Loading branch information
nonrational committed Nov 18, 2024
1 parent c2c787e commit efa621a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .githelpers
Original file line number Diff line number Diff line change
Expand Up @@ -122,16 +122,16 @@ delete_remoteless_branches_interactive() {

# Delete all personally-prefixed non-primary branches with confirmation.
delete_all_my_branches_interactive(){
for branch in $(git branch | egrep '^\W*(aln|anorton|alan)/'); do
for branch in $(git branch | egrep '^\W*(aln|anorton)/'); do
printf "Delete $branch, both local and origin? ";
read ans;
[[ "$ans" == "y" ]] && git branch -D $branch && git push origin :$branch
done
}

# Delete all non-personally-prefixed non-primary branches.
# Delete all non-personally-prefixed, non-primary branches.
delete_all_others_local_branches(){
for branch in $(git branch | grep '/' | grep -v 'aln\|anorton\/'); do
for branch in $(git branch | grep '/' | egrep -v '^\W*(aln|anorton)/'); do
printf "Delete $branch? ";
read ans;
[[ "$ans" == "y" ]] && git branch -D $branch
Expand Down

0 comments on commit efa621a

Please sign in to comment.