2
0
mirror of https://github.com/webgefrickel/dotfiles synced 2024-11-15 12:12:58 +00:00
steffen-dotfiles/zsh/aliases

87 lines
2.8 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 nvim, see exports
alias vim=$EDITOR
alias vi=$EDITOR
alias v=$EDITOR
2017-03-19 12:33:14 +00:00
alias vimdiff='$EDITOR -d'
alias vdiff='$EDITOR -d'
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'
2014-06-24 12:59:40 +00:00
# suffix-aliases for file-types (zsh only)
2017-01-16 16:53:04 +00:00
alias -s css=$EDITOR
alias -s html=$EDITOR
2020-10-04 11:07:10 +00:00
alias -s js=$EDITOR
alias -s json=$EDITOR
alias -s jsx=$EDITOR
2017-01-16 16:53:04 +00:00
alias -s md=$EDITOR
2020-10-04 11:07:10 +00:00
alias -s scss=$EDITOR
2017-01-16 16:53:04 +00:00
alias -s txt=$EDITOR
2020-10-04 11:07:10 +00:00
alias -s yaml=$EDITOR
2014-06-24 12:59:40 +00:00
2016-08-19 09:26:10 +00:00
# better ls / l command
alias l='ls -alGp'
2013-07-19 17:17:05 +00:00
2017-03-06 16:36:58 +00:00
# mutt
2017-10-31 16:58:28 +00:00
alias m='neomutt'
# alias for syncing everything
2020-05-03 17:45:33 +00:00
alias O="cd ~ && mbsync -a && mu index && vdirsyncer sync"
2017-03-06 16:36:58 +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 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'
alias gmo='$EDITOR $(git ls-files -m)'
2013-07-19 17:17:05 +00:00
# tmux
alias t='tmux -u -2'
alias ta='tmux -u attach'
2013-07-19 17:17:05 +00:00
# all in one homebrew, gem update commands
2017-07-19 19:33:23 +00:00
alias brewup='brew update && brew upgrade && brew cu -a -f -y && brew cleanup'
2020-05-03 17:45:33 +00:00
alias upall='brewup && npm-check -gu'
2013-07-19 17:17:05 +00:00
2020-07-08 17:27:44 +00:00
# temp fix for dnsmasq-bootup/unifi-java fuckup
# <key>JVMRuntime</key> <string>adoptopenjdk-8.jdk</string>
2020-04-04 13:25:11 +00:00
alias dnsmasqfix='sudo brew services stop dnsmasq && sudo mkdir /usr/local/etc/dnsmasq.d && sudo brew services start dnsmasq'
2020-07-08 17:27:44 +00:00
alias unififix='sudo ln -s /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk /Applications/UniFi.app/Contents/PlugIns/adoptopenjdk-8.jdk && sudo v /Applications/UniFi.app/Contents/Info.plist'
2020-04-04 13:25:11 +00:00
2017-01-16 16:53:04 +00:00
# other often used stuff, mostly node/npm
alias ns="npm start"
2018-04-28 19:08:11 +00:00
alias nb="npm run build"
2018-02-08 14:06:50 +00:00
alias npmre='rm -f package-lock.json && rm -rf node_modules && npm install'
2020-04-22 12:07:17 +00:00
alias ys='yarn develop'
2020-03-12 15:05:19 +00:00
alias yp='yarn lint && yarn production'
2018-10-09 08:19:41 +00:00
alias yre='rm -f yarn.lock && rm -rf node_modules && yarn'
2013-07-19 17:17:05 +00:00
# often used folder shortcuts
2020-03-07 14:23:17 +00:00
alias web='cd ~/Sites && l'
alias rep='cd ~/Repositories && l'
alias dot='cd ~/Dotfiles && l'
2013-07-19 17:17:05 +00:00
# random usefull stuff
alias dnsflush='sudo dscacheutil -flushcache'
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!)
2016-05-25 20:41:19 +00:00
alias jpg25='mogrify -format jpg -resize 25% -strip -quality 80 *.jpg'
alias jpg50='mogrify -format jpg -resize 50% -strip -quality 80 *.jpg'
alias png25='mogrify -format png -resize 25% -strip -quality 80 *.png'
alias png50='mogrify -format png -resize 50% -strip -quality 80 *.png'
alias webimg='mogrify -format jpg -resize 1600x1600 -strip -quality 70'
2016-06-28 08:01:12 +00:00
alias anigif='convert -delay 12 -loop 0 *.jpg animated.gif'