summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorJulien Janvier <3691804+jjanvier@users.noreply.github.com>2019-08-20 12:11:38 +0200
committerMarc Cornellà <marc.cornella@live.com>2019-08-20 12:11:38 +0200
commitde3b14cf69eeb43797bae8320af6972032b604ff (patch)
tree2104f6fa9bc74c6a7363a22e7ed18e8620d92b30 /plugins
parent43ed0b455ed5bbf66ef3e604c3d9845eb90f0078 (diff)
downloadzsh-de3b14cf69eeb43797bae8320af6972032b604ff.tar.gz
zsh-de3b14cf69eeb43797bae8320af6972032b604ff.tar.bz2
zsh-de3b14cf69eeb43797bae8320af6972032b604ff.zip
git: add aliases for git switch and restore (#8089)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/git/README.md4
-rw-r--r--plugins/git/git.plugin.zsh4
2 files changed, 8 insertions, 0 deletions
diff --git a/plugins/git/README.md b/plugins/git/README.md
index fc89b27e0..3311ccf55 100644
--- a/plugins/git/README.md
+++ b/plugins/git/README.md
@@ -131,7 +131,9 @@ plugins=(... git)
| grmc | git rm --cached |
| grmv | git remote rename |
| grrm | git remote remove |
+| grs | git restore |
| grset | git remote set-url |
+| grss | git restore --source |
| grt | cd "$(git rev-parse --show-toplevel \|\| echo .)" |
| gru | git reset -- |
| grup | git remote update |
@@ -154,6 +156,8 @@ plugins=(... git)
| gsts | git stash show --text |
| gstall | git stash --all |
| gsu | git submodule update |
+| gsw | git switch |
+| gswc | git switch -c |
| gts | git tag -s |
| gtv | git tag \| sort -V |
| gtl | gtl(){ git tag --sort=-v:refname -n -l ${1}* }; noglob gtl |
diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh
index e0ce27fd4..9787392de 100644
--- a/plugins/git/git.plugin.zsh
+++ b/plugins/git/git.plugin.zsh
@@ -207,7 +207,9 @@ alias grm='git rm'
alias grmc='git rm --cached'
alias grmv='git remote rename'
alias grrm='git remote remove'
+alias grs='git restore'
alias grset='git remote set-url'
+alias grss='git restore --source'
alias grt='cd "$(git rev-parse --show-toplevel || echo .)"'
alias gru='git reset --'
alias grup='git remote update'
@@ -236,6 +238,8 @@ alias gstp='git stash pop'
alias gsts='git stash show --text'
alias gstall='git stash --all'
alias gsu='git submodule update'
+alias gsw='git switch'
+alias gswc='git switch -c'
alias gts='git tag -s'
alias gtv='git tag | sort -V'