mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-26 02:12:33 +01:00
Adding aliases for git and my own OSX commands to their respective plugins
This commit is contained in:
parent
2a774a41b2
commit
7ee5f7ab33
2 changed files with 52 additions and 9 deletions
|
|
@ -1,15 +1,21 @@
|
||||||
# Aliases
|
# Aliases
|
||||||
alias g='git'
|
alias g='git'
|
||||||
alias gst='git status'
|
alias ga='git add'
|
||||||
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 gb='git branch'
|
||||||
alias gba='git branch -a'
|
alias gba='git branch -a'
|
||||||
|
alias gbd='git branch -d'
|
||||||
|
alias gbr='git branch -r'
|
||||||
|
alias gc='git commit -v'
|
||||||
|
alias gca='git commit -v -a'
|
||||||
|
alias gco='git checkout'
|
||||||
|
alias gcob='git checkout -b'
|
||||||
|
alias gd='git diff | mate'
|
||||||
|
alias gdv='git diff -w "$@" | vim -R -'
|
||||||
|
alias gl='git pull'
|
||||||
|
alias gp='git push'
|
||||||
|
alias gs='git status'
|
||||||
|
alias grm='git status | grep deleted | awk "{print \$3}" | xargs git rm'
|
||||||
|
alias gup='git fetch && git rebase'
|
||||||
alias gcount='git shortlog -sn'
|
alias gcount='git shortlog -sn'
|
||||||
alias gcp='git cherry-pick'
|
alias gcp='git cherry-pick'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,4 +8,41 @@ function tab() {
|
||||||
do script with command "cd \"$PWD\"; $*" in window 1
|
do script with command "cd \"$PWD\"; $*" in window 1
|
||||||
end tell
|
end tell
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# OSX doesn't have wget
|
||||||
|
alias wget='curl -O'
|
||||||
|
|
||||||
|
# Postgres for Mac OS X
|
||||||
|
if [ -x /usr/local/pgsql ]; then
|
||||||
|
export PATH=/usr/local/pgsql/bin:$PATH
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Macports for Mac OS X
|
||||||
|
if [ -x /opt/local/bin/port ]; then
|
||||||
|
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
|
||||||
|
export MANPATH=/opt/local/share/man:$MANPATH
|
||||||
|
|
||||||
|
alias Pg='sudo port -v install'
|
||||||
|
alias Ps='port search'
|
||||||
|
alias Pi='port info'
|
||||||
|
alias Pr='sudo port uninstall'
|
||||||
|
alias dsl='port installed | grep -i'
|
||||||
|
|
||||||
|
function InitMacports () {
|
||||||
|
cmds=(
|
||||||
|
cat chgrp chmod chown cp dd df diff du false head
|
||||||
|
ln ls mkdir mkfifo mv pwd rm rmdir sleep sort
|
||||||
|
stat tail tee true uniq who whoami yes
|
||||||
|
)
|
||||||
|
|
||||||
|
for cmd in $cmds; do
|
||||||
|
ln -vs /opt/local/bin/g$cmd /usr/local/bin/$cmd
|
||||||
|
done
|
||||||
|
}
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Fink for Mac OS X
|
||||||
|
if [ -x /sw/bin/init.sh ]; then
|
||||||
|
_append_to_path /sw/bin/init.sh
|
||||||
|
fi
|
||||||
Loading…
Add table
Add a link
Reference in a new issue