diff options
author | Jakub Chábek <jakub@chabek.cz> | 2019-03-29 22:56:59 +0100 |
---|---|---|
committer | Marc CornellĂ <marc.cornella@live.com> | 2019-03-29 22:56:59 +0100 |
commit | 0e0789fb7aedd1afd8ae07dfc9609f6a7f2e407f (patch) | |
tree | 1bf1af22c222923aab20ccbea50ce938bc9798f9 /plugins | |
parent | f1799de0c92357cfafd501c3f74375d197a1708c (diff) | |
download | zsh-0e0789fb7aedd1afd8ae07dfc9609f6a7f2e407f.tar.gz zsh-0e0789fb7aedd1afd8ae07dfc9609f6a7f2e407f.tar.bz2 zsh-0e0789fb7aedd1afd8ae07dfc9609f6a7f2e407f.zip |
git: delete branches in `gbda` only if there are any (#6079)
It doesn't make sense to run `git branch -d $BRANCH` if the `$BRANCH` is empty.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/git/git.plugin.zsh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index 6fc9b078b..8eccc9cee 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -50,7 +50,7 @@ alias gap='git apply' alias gb='git branch' alias gba='git branch -a' alias gbd='git branch -d' -alias gbda='git branch --no-color --merged | command grep -vE "^(\*|\s*(master|develop|dev)\s*$)" | command xargs -n 1 git branch -d' +alias gbda='git branch --no-color --merged | command grep -vE "^(\*|\s*(master|develop|dev)\s*$)" | command xargs -r -n 1 git branch -d' alias gbD='git branch -D' alias gbl='git blame -b -w' alias gbnm='git branch --no-merged' |