summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhang Visper <reg@zjy.name>2023-08-24 17:37:38 +0800
committerGitHub <noreply@github.com>2023-08-24 11:37:38 +0200
commitc92af18c36c84cef0c785e1ae9cabc49a61a5c3a (patch)
tree627c974d0c163fe062b9be166d7a33282dc64561
parent33c0de7add12b050b94fd6f2f988e9b5547d172c (diff)
downloadzsh-c92af18c36c84cef0c785e1ae9cabc49a61a5c3a.tar.gz
zsh-c92af18c36c84cef0c785e1ae9cabc49a61a5c3a.tar.bz2
zsh-c92af18c36c84cef0c785e1ae9cabc49a61a5c3a.zip
fix(git): some aliases under non-english LANG (#11855)
-rw-r--r--plugins/git/README.md6
-rw-r--r--plugins/git/git.plugin.zsh6
2 files changed, 6 insertions, 6 deletions
diff --git a/plugins/git/README.md b/plugins/git/README.md
index 0b757c481..c3e6dd27d 100644
--- a/plugins/git/README.md
+++ b/plugins/git/README.md
@@ -40,12 +40,12 @@ plugins=(... git)
| gbd | git branch --delete |
| gbD | git branch --delete --force |
| gbda | git branch --no-color --merged &#124; grep -vE "^([+]&#124;\s($(git_main_branch)&#124;$(git_develop_branch))\s\*$)" &#124; xargs git branch --delete 2>/dev/null |
-| gbgd | git branch --no-color -vv |
-| gbgD | git branch --no-color -vv |
+| gbgd | LANG=C git branch --no-color -vv | grep ": gone\]" | awk '"'"'{print $1}'"'"' | xargs git branch -d |
+| gbgD | LANG=C git branch --no-color -vv | grep ": gone\]" | awk '"'"'{print $1}'"'"' | xargs git branch -D |
| gbnm | git branch --no-merged |
| gbr | git branch --remote |
| ggsup | git branch --set-upstream-to=origin/$(git_current_branch) |
-| gbg | git branch -vv |
+| gbg | LANG=C git branch -vv | grep ": gone\]" |
| gco | git checkout |
| gcor | git checkout --recurse-submodules |
| gcb | git checkout -b |
diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh
index b321ce7b0..8886aac6d 100644
--- a/plugins/git/git.plugin.zsh
+++ b/plugins/git/git.plugin.zsh
@@ -121,12 +121,12 @@ alias gba='git branch --all'
alias gbd='git branch --delete'
alias gbD='git branch --delete --force'
alias gbda='git branch --no-color --merged | command grep -vE "^([+*]|\s*($(git_main_branch)|$(git_develop_branch))\s*$)" | command xargs git branch --delete 2>/dev/null'
-alias gbgd='git branch --no-color -vv | grep ": gone\]" | awk '"'"'{print $1}'"'"' | xargs git branch -d'
-alias gbgD='git branch --no-color -vv | grep ": gone\]" | awk '"'"'{print $1}'"'"' | xargs git branch -D'
+alias gbgd='LANG=C git branch --no-color -vv | grep ": gone\]" | awk '"'"'{print $1}'"'"' | xargs git branch -d'
+alias gbgD='LANG=C git branch --no-color -vv | grep ": gone\]" | awk '"'"'{print $1}'"'"' | xargs git branch -D'
alias gbnm='git branch --no-merged'
alias gbr='git branch --remote'
alias ggsup='git branch --set-upstream-to=origin/$(git_current_branch)'
-alias gbg='git branch -vv | grep ": gone\]"'
+alias gbg='LANG=C git branch -vv | grep ": gone\]"'
alias gco='git checkout'
alias gcor='git checkout --recurse-submodules'
alias gcb='git checkout -b'