2
0
mirror of https://github.com/webgefrickel/dotfiles synced 2024-11-17 09:25:52 +00:00
steffen-dotfiles/zsh/aliases

105 lines
3.6 KiB
Plaintext
Raw Normal View History

2014-06-24 12:59:40 +00:00
# make aliases and other stuff work in sudo
alias sudo='sudo '
# always use macvim but for 'vim'
alias vim=$EDITOR
alias vi=$EDITOR
alias v=$EDITOR
2015-02-19 17:45:15 +00:00
alias vd=$EDITOR -d
2013-07-19 17:17:05 +00:00
# Easier navigation: .., ..., ~ and -
alias ~="cd ~"
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias .....='cd ../../../..'
2014-11-19 11:08:43 +00:00
alias q='exit'
# fasd
alias a='fasd -a' # any
alias s='fasd -si' # show / search / select
alias d='fasd -d' # directory
alias f='fasd -f' # file
alias sd='fasd -sid' # interactive directory selection
alias sf='fasd -sif' # interactive file selection
alias z='fasd_cd -d' # cd, same functionality as j in autojump
alias zz='fasd_cd -d -i' # cd with interactive selection
2014-06-24 12:59:40 +00:00
# suffix-aliases for file-types (zsh only)
alias -s css=vim
alias -s scss=vim
alias -s js=vim
alias -s html=vim
alias -s md=vim
alias -s txt=vim
2014-12-16 17:21:41 +00:00
# clipper -- https://github.com/wincent/clipper
alias clip="nc localhost 8377"
2014-06-24 12:59:40 +00:00
# gnu coreutils
alias ls="gls -al --color=auto"
alias l='gls -al --color=auto'
2013-07-19 17:17:05 +00:00
# Gitty gitgit
alias g="git"
2014-09-19 16:08:36 +00:00
alias gf="git-flow"
2015-03-01 15:47:26 +00:00
alias gs="git status"
alias gst="git status"
alias ggpl='git pull origin $(current_branch)'
alias ggps='git push origin $(current_branch)'
alias ggpnp='git pull origin $(current_branch) && git push origin $(current_branch)'
2013-07-19 17:17:05 +00:00
alias gsmu='git submodule init && git submodule update'
2014-02-22 16:44:20 +00:00
alias gsmuu='git submodule foreach git pull origin master'
2013-09-03 16:26:14 +00:00
alias gsvn='git checkout master && git svn fetch && git merge dev && git svn rebase && git svn dcommit'
alias gmo='$EDITOR $(git ls-files -m)'
# aliases for apache and mysql
2014-01-03 19:25:18 +00:00
alias apachestart='sudo apachectl start'
alias apachestop='sudo apachectl stop'
alias mysqlstart='mysql.server start'
alias mysqlstop='mysql.server stop'
2014-07-18 16:30:36 +00:00
alias dev='apachestart && mysqlstart'
alias devs='apachestop && mysqlstop'
alias devr='devs && dev'
2013-07-19 17:17:05 +00:00
# tmux
alias t='tmux -u -2'
alias ta='tmux attach'
# all in one homebrew, gem update commands
alias brewup='brew update && brew upgrade && brew cleanup && brew linkapps'
alias gemup='gem update --system && gem update && gem cleanup'
2014-07-18 17:06:11 +00:00
alias npmup='npm -g cache clean && npm -g update'
2013-12-04 10:51:06 +00:00
alias sysup='sudo softwareupdate -i -a'
2013-12-07 14:33:30 +00:00
alias upall='sysup && brewup && gemup && npmup'
2013-07-19 17:17:05 +00:00
2015-01-22 13:55:23 +00:00
# other often used stuff
alias npmre='rm -rf node_modules && npm cache clean && npm install'
2013-07-19 17:17:05 +00:00
# easy hosts / apache / php editing
2013-12-04 10:51:06 +00:00
alias hosts='sudo vim /etc/hosts'
2014-01-03 19:25:18 +00:00
alias vhosts='sudo vim /usr/local/etc/apache2/extra/httpd-vhosts.conf'
2014-07-18 16:30:36 +00:00
alias phpini='vim /usr/local/etc/php/5.5/php.ini'
2014-08-14 15:08:33 +00:00
alias httpconf='vim /usr/local/etc/apache2/httpd.conf'
2013-07-19 17:17:05 +00:00
2015-01-22 13:55:23 +00:00
# docker stuff
alias drft='docker run -it -v $(pwd)/:/code/ docker-frontend-tools'
2013-07-19 17:17:05 +00:00
# often used folder shortcuts
alias drop='cd ~/Dropbox && ls -al'
alias web='cd ~/Sites && ls -al'
alias rep='cd ~/Repositories && ls -al'
alias dot='cd ~/Dotfiles && ls -al'
# random usefull stuff
alias dnsflush='sudo dscacheutil -flushcache'
alias cleanup="find . -type f -name '*.DS_Store' -ls -delete"
2014-10-16 17:04:18 +00:00
alias lock="/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend"
# imagemagick downsampling shortcuts (c&p retina folder, run, done!)
# http://www.imagemagick.org/Usage/filter/nicolas/#downsample
alias png25='find . -name "*.png" | xargs mogrify -colorspace RGB -filter LanczosRadius -distort Resize 25% -colorspace sRGB'
alias jpg25='find . -name "*.jpg" | xargs mogrify -colorspace RGB -filter LanczosRadius -distort Resize 25% -colorspace sRGB'
alias png50='find . -name "*.png" | xargs mogrify -colorspace RGB -filter LanczosRadius -distort Resize 50% -colorspace sRGB'
alias jpg50='find . -name "*.jpg" | xargs mogrify -colorspace RGB -filter LanczosRadius -distort Resize 50% -colorspace sRGB'