Alias for git grep

This commit is contained in:
Christoph Bachhuber 2020-08-10 12:20:32 +02:00
commit 79206bc072
2 changed files with 3 additions and 0 deletions

View file

@ -74,6 +74,7 @@ plugins=(... git)
| ggf | git push --force origin $(current_branch) |
| ggfl | git push --force-with-lease origin $(current_branch) |
| ggl | git pull origin $(current_branch) |
| ggn | git grep -n |
| ggp | git push origin $(current_branch) |
| ggpnp | ggl && ggp |
| ggpull | git pull origin "$(git_current_branch)" |

View file

@ -133,6 +133,8 @@ function ggl() {
}
compdef _git ggl=git-checkout
alias ggn='git grep -n'
function ggp() {
if [[ "$#" != 0 ]] && [[ "$#" != 1 ]]; then
git push origin "${*}"