Fix history handler and git plugin

This commit is contained in:
Toan Nguyen
2017-03-19 17:13:00 +07:00
parent f300d599a8
commit fc9c567fec
2 changed files with 9 additions and 3 deletions

View File

@ -1,3 +1,5 @@
shopt -s histappend # append to bash_history if Terminal.app quits
## Command history configuration
if [ -z "$HISTFILE" ]; then
HISTFILE=$HOME/.bash_history

View File

@ -75,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 complete -F _git gcount
alias gcp='git cherry-pick'
alias gcpa='git cherry-pick --abort'
alias gcpc='git cherry-pick --continue'
@ -87,14 +87,18 @@ alias gdct='git describe --tags `git rev-list --tags --max-count=1`'
alias gdt='git diff-tree --no-commit-id --name-only -r'
alias gdw='git diff --word-diff'
gdv() { git diff -w "$@" | view - }
gdv() {
git diff -w "$@" | view -
}
#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 $@ }
gfg() {
git ls-files | grep "$@"
}
#compdef _grep gfg
alias gg='git gui citool'