diff options
Diffstat (limited to 'lib/git.zsh')
-rw-r--r-- | lib/git.zsh | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/lib/git.zsh b/lib/git.zsh index 629a08b0e..889dd98df 100644 --- a/lib/git.zsh +++ b/lib/git.zsh @@ -5,33 +5,9 @@ function git_prompt_info() { } parse_git_dirty () { - if [[ $((git status 2> /dev/null) | tail -n1) != "nothing to commit (working directory clean)" ]]; then + if [[ -n $(git status -s 2> /dev/null) ]]; then echo "$ZSH_THEME_GIT_PROMPT_DIRTY" else echo "$ZSH_THEME_GIT_PROMPT_CLEAN" fi } - -# -# Will return the current branch name -# Usage example: git pull origin $(current_branch) -# -function current_branch() { - ref=$(git symbolic-ref HEAD 2> /dev/null) || return - echo ${ref#refs/heads/} -} - -# Aliases -alias g='git' -alias gst='git status' -alias gl='git pull' -alias gup='git fetch && git rebase' -alias gp='git push' -alias gd='git diff | mate' -alias gdv='git diff -w "$@" | vim -R -' -alias gc='git commit -v' -alias gca='git commit -v -a' -alias gb='git branch' -alias gba='git branch -a' -alias gcount='git shortlog -sn' -alias gcp='git cherry-pick' |