Remove compdef function and added bash env to all plugins
This commit is contained in:
parent
28ff5623b5
commit
f300d599a8
@ -1,3 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2014, NNToan - http://about.me/nntoan
|
||||
# All rights reserved.
|
||||
#
|
||||
|
@ -1,3 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
#
|
||||
# Description: This file holds all my BASH configurations and aliases
|
||||
|
@ -1,3 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
#
|
||||
# Functions
|
||||
#
|
||||
@ -73,7 +75,7 @@ alias gcd='git checkout develop'
|
||||
alias gcmsg='git commit -m'
|
||||
alias gco='git checkout'
|
||||
alias gcount='git shortlog -sn'
|
||||
compdef _git gcount
|
||||
#compdef _git gcount
|
||||
alias gcp='git cherry-pick'
|
||||
alias gcpa='git cherry-pick --abort'
|
||||
alias gcpc='git cherry-pick --continue'
|
||||
@ -86,14 +88,14 @@ alias gdt='git diff-tree --no-commit-id --name-only -r'
|
||||
alias gdw='git diff --word-diff'
|
||||
|
||||
gdv() { git diff -w "$@" | view - }
|
||||
compdef _git gdv=git-diff
|
||||
#compdef _git gdv=git-diff
|
||||
|
||||
alias gf='git fetch'
|
||||
alias gfa='git fetch --all --prune'
|
||||
alias gfo='git fetch origin'
|
||||
|
||||
function gfg() { git ls-files | grep $@ }
|
||||
compdef _grep gfg
|
||||
#compdef _grep gfg
|
||||
|
||||
alias gg='git gui citool'
|
||||
alias gga='git gui citool --amend'
|
||||
@ -102,7 +104,7 @@ ggf() {
|
||||
[[ "$#" != 1 ]] && local b="$(git_current_branch)"
|
||||
git push --force origin "${b:=$1}"
|
||||
}
|
||||
compdef _git ggf=git-checkout
|
||||
#compdef _git ggf=git-checkout
|
||||
|
||||
ggl() {
|
||||
if [[ "$#" != 0 ]] && [[ "$#" != 1 ]]; then
|
||||
@ -112,7 +114,7 @@ ggl() {
|
||||
git pull origin "${b:=$1}"
|
||||
fi
|
||||
}
|
||||
compdef _git ggl=git-checkout
|
||||
#compdef _git ggl=git-checkout
|
||||
|
||||
ggp() {
|
||||
if [[ "$#" != 0 ]] && [[ "$#" != 1 ]]; then
|
||||
@ -122,7 +124,7 @@ ggp() {
|
||||
git push origin "${b:=$1}"
|
||||
fi
|
||||
}
|
||||
compdef _git ggp=git-checkout
|
||||
#compdef _git ggp=git-checkout
|
||||
|
||||
ggpnp() {
|
||||
if [[ "$#" == 0 ]]; then
|
||||
@ -131,22 +133,22 @@ ggpnp() {
|
||||
ggl "${*}" && ggp "${*}"
|
||||
fi
|
||||
}
|
||||
compdef _git ggpnp=git-checkout
|
||||
#compdef _git ggpnp=git-checkout
|
||||
|
||||
ggu() {
|
||||
[[ "$#" != 1 ]] && local b="$(git_current_branch)"
|
||||
git pull --rebase origin "${b:=$1}"
|
||||
}
|
||||
compdef _git ggu=git-checkout
|
||||
#compdef _git ggu=git-checkout
|
||||
|
||||
alias ggpur='ggu'
|
||||
compdef _git ggpur=git-checkout
|
||||
#compdef _git ggpur=git-checkout
|
||||
|
||||
alias ggpull='git pull origin $(git_current_branch)'
|
||||
compdef _git ggpull=git-checkout
|
||||
#compdef _git ggpull=git-checkout
|
||||
|
||||
alias ggpush='git push origin $(git_current_branch)'
|
||||
compdef _git ggpush=git-checkout
|
||||
#compdef _git ggpush=git-checkout
|
||||
|
||||
alias ggsup='git branch --set-upstream-to=origin/$(git_current_branch)'
|
||||
alias gpsup='git push --set-upstream origin $(git_current_branch)'
|
||||
@ -156,12 +158,12 @@ alias ghh='git help'
|
||||
alias gignore='git update-index --assume-unchanged'
|
||||
alias gignored='git ls-files -v | grep "^[[:lower:]]"'
|
||||
alias git-svn-dcommit-push='git svn dcommit && git push github master:svntrunk'
|
||||
compdef _git git-svn-dcommit-push=git
|
||||
#compdef _git git-svn-dcommit-push=git
|
||||
|
||||
alias gk='\gitk --all --branches'
|
||||
compdef _git gk='gitk'
|
||||
#compdef _git gk='gitk'
|
||||
alias gke='\gitk --all $(git log -g --pretty=%h)'
|
||||
compdef _git gke='gitk'
|
||||
#compdef _git gke='gitk'
|
||||
|
||||
alias gl='git pull'
|
||||
alias glg='git log --stat'
|
||||
@ -175,7 +177,7 @@ alias glola="git log --graph --pretty='%Cred%h%Creset -%C(yellow)%d%Creset %s %C
|
||||
alias glog='git log --oneline --decorate --graph'
|
||||
alias gloga='git log --oneline --decorate --graph --all'
|
||||
alias glp="_git_log_prettily"
|
||||
compdef _git glp=git-log
|
||||
#compdef _git glp=git-log
|
||||
|
||||
alias gm='git merge'
|
||||
alias gmom='git merge origin/master'
|
||||
@ -186,7 +188,7 @@ alias gmum='git merge upstream/master'
|
||||
alias gp='git push'
|
||||
alias gpd='git push --dry-run'
|
||||
alias gpoat='git push origin --all && git push origin --tags'
|
||||
compdef _git gpoat=git-push
|
||||
#compdef _git gpoat=git-push
|
||||
alias gpu='git push upstream'
|
||||
alias gpv='git push -v'
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user