From efa621ad07feaeb5e91d8c14fede98303f464b63 Mon Sep 17 00:00:00 2001 From: Alan Norton Date: Mon, 18 Nov 2024 09:47:49 -0500 Subject: [PATCH] egrep --- .githelpers | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.githelpers b/.githelpers index fc8e1df..38992b3 100644 --- a/.githelpers +++ b/.githelpers @@ -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