mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-09 02:24:03 +01:00
Updating git aliases
This commit is contained in:
parent
8a013666f0
commit
3021cc7e29
2 changed files with 39 additions and 26 deletions
|
|
@ -106,11 +106,21 @@ if [[ "$TERM" == 'xterm-256color' ]]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
if [[ "$TMUX" != "" ]]; then
|
||||
# For some reason tmux does a `cd -P $PWD` for it's default-path.
|
||||
# my homedir is /u/$USER, but /u is a symlink to /usr/home/nfs, but I want
|
||||
# my PROMPT to show '~' instead of '/usr/home/nfs'. This accomplishes that.
|
||||
if [[ "${PWD#*$USER}" != "" ]] && [[ "${PWD#*$USER}" != "${PWD}" ]]; then
|
||||
cd ~/${PWD#*$USER/}
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
alias screen="screen $screenrc"
|
||||
alias sl="screen $screenrc -list"
|
||||
alias sr="screen $screenrc -a -A -U -D -R"
|
||||
alias S="screen $screenrc -U -S"
|
||||
|
||||
alias tmux="tmux $tmuxconf"
|
||||
alias tls="tmux list-sessions"
|
||||
alias tl="tmux list-sessions"
|
||||
|
||||
|
|
|
|||
|
|
@ -14,8 +14,11 @@ alias gup='git fetch && git rebase' ; compdef _git gup=git-fetch
|
|||
alias gf='git fetch' ; compdef _git gf=git-fetch
|
||||
alias gp='git push' ; compdef _git gp=git-push
|
||||
alias gd='git diff --no-ext-diff -b' ; compdef _git gd=git-diff
|
||||
alias gdd='git diff --no-ext-diff' ; compdef _git gdd=git-diff
|
||||
gdv() { git-diff -w "$@" | view - } ; compdef _git gdv=git-diff
|
||||
alias gD='git diff --no-ext-diff -b --cached' ; compdef _git gD=git-diff
|
||||
alias gdw='git diff --no-ext-diff' ; compdef _git gdw=git-diff
|
||||
alias gDw='git diff --no-ext-diff --cached' ; compdef _git gDw=git-diff
|
||||
gdv() { git diff -w "$@" | view - } ; compdef _git gdv=git-diff
|
||||
gDv() { git diff --cache -w "$@" | view - } ; compdef _git gDv=git-diff
|
||||
alias gc='git commit -v' ; compdef _git gc=git-commit
|
||||
alias gca='git commit -v -a' ; compdef _git gca=git-commit
|
||||
alias gco='git checkout' ; compdef _git gco=git-checkout
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue