From 6748d2a31dfaf657bdf895cd84b12feafdcce269 Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Mon, 11 May 2015 15:06:15 -0400 Subject: [PATCH] bd{,-} added --- README.md | 2 ++ shortmaps | 2 ++ 2 files changed, 4 insertions(+) diff --git a/README.md b/README.md index 8893c2c..9ce1a7a 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,8 @@ By default, the following mappings are available, each with tab completion: * `A` - git add -A * `AS` - git add -A && git push * `b` - git branch +* `bd` - git branch --delete +* `bd-` - delete branch `@{-1}` * `bv` - git branch -v * `B` - git bisect * `Bs` - git bisect start diff --git a/shortmaps b/shortmaps index 4bca6cb..5f4bd35 100644 --- a/shortmaps +++ b/shortmaps @@ -2,6 +2,8 @@ a _git_add :add A _git_add :add -A AS : |git add -A && git stash b _git_branch :branch +bd _git_branch :branch -d +bd- : |ref="$( git rev-parse --symbolic-full-name @{-1} )"; git branch -d "${ref#refs/heads/*}" bv _git_branch :branch -v B _git_bisect :bisect Bs _git_bisect :bisect start