Refactor bash aliases

This commit is contained in:
2016-01-04 14:34:29 +02:00
parent a314f336e4
commit 461f3170d2
+36 -37
View File
@@ -1,40 +1,4 @@
alias grep="grep --color=auto"
alias c="clear"
alias be="bundle exec"
alias share="python -m SimpleHTTPServer"
# Mac OS Specific
# Need to export these to a different file for mac specific aliases
alias showfiles="defaults write com.apple.finder AppleShowAllFiles YES; killall Finder /System/Library/CoreServices/Finder.app"
alias hidefiles="defaults write com.apple.finder AppleShowAllFiles NO; killall Finder /System/Library/CoreServices/Finder.app"
alias startvpn="sudo launchctl load -w /Library/LaunchDaemons/net.juniper.AccessService.plist; open -a '/Applications/Junos Pulse.app/Contents/Plugins/JamUI/PulseTray.app/Contents/MacOS/PulseTray'"
alias quitvpn="osascript -e 'tell application \"PulseTray.app\" to quit';sudo launchctl unload -w /Library/LaunchDaemons/net.juniper.AccessService.plist"
alias cask="brew cask"
# Easier APT
alias install="sudo apt-get install"
alias purge="sudo apt-get purge"
alias search="sudo apt-cache search"
alias remove="sudo apt-get remove"
alias autoremove="sudo apt-get autoremove"
# PC Info
alias mountinfo="mount | column -t"
alias meminfo="free -mlt"
alias driveinfo="df -h"
# Launchers
alias lstart="sudo /opt/lampp/lampp start"
alias lstop="sudo /opt/lampp/lampp stop"
alias pgstart="sudo service postgresql start"
alias pgstop="sudo service postgresql stop"
alias sass_watch="sass --watch ./:./"
alias s="sublime"
alias minecraft='padsp java -Xmx2048M -Xms1024M -cp ~/Minecraft/minecraft.jar net.minecraft.LauncherFrame'
##### Platform independent #####
# Git Aliases
alias g="git"
alias much="git"
@@ -62,10 +26,45 @@ alias vimrc="vim ~/.vimrc"
# CD-ing to some commonly used folders
alias og="cd ~/Git"
alias sass_watch="sass --watch ./:./"
alias s="sublime"
alias grep="grep --color=auto"
alias c="clear"
alias be="bundle exec"
alias share="python -m SimpleHTTPServer"
##### Mac OS Specific #####
alias showfiles="defaults write com.apple.finder AppleShowAllFiles YES; killall Finder /System/Library/CoreServices/Finder.app"
alias hidefiles="defaults write com.apple.finder AppleShowAllFiles NO; killall Finder /System/Library/CoreServices/Finder.app"
alias startvpn="sudo launchctl load -w /Library/LaunchDaemons/net.juniper.AccessService.plist; open -a '/Applications/Junos Pulse.app/Contents/Plugins/JamUI/PulseTray.app/Contents/MacOS/PulseTray'"
alias quitvpn="osascript -e 'tell application \"PulseTray.app\" to quit';sudo launchctl unload -w /Library/LaunchDaemons/net.juniper.AccessService.plist"
alias cask="brew cask"
##### Ubuntu/Linux Specific #####
# Easier APT
alias install="sudo apt-get install"
alias purge="sudo apt-get purge"
alias search="sudo apt-cache search"
alias remove="sudo apt-get remove"
alias autoremove="sudo apt-get autoremove"
# Secondary Monitor
alias monitor_enable="xrandr --output CRT1 --auto --right-of LVDS"
alias monitor_disable="xrandr --output CRT1 --off"
# PC Info
alias mountinfo="mount | column -t"
alias meminfo="free -mlt"
alias driveinfo="df -h"
# Launchers
alias lstart="sudo /opt/lampp/lampp start"
alias lstop="sudo /opt/lampp/lampp stop"
alias pgstart="sudo service postgresql start"
alias pgstop="sudo service postgresql stop"
if [ -f ~/.bash_local_aliases ]; then
. ~/.bash_local_aliases
fi