Last active
June 8, 2016 10:57
-
-
Save nahuelsotelo/5896adbc657f1346c040a6788ec185fd to your computer and use it in GitHub Desktop.
Aliases for zsh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ############################## | |
| # Git push and pull allways from the current branch. | |
| # ############################## | |
| get_git_branch() { | |
| echo `git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'` | |
| } | |
| alias gpull='git pull origin `get_git_branch`' | |
| alias gpush='git push origin `get_git_branch`' | |
| # ############################## | |
| # Reload zsh config after change without restart session | |
| # ############################## | |
| alias reload!='. ~/.zshrc' | |
| # ############################## | |
| # Edit hosts | |
| # ############################## | |
| alias hosts="sudo vi /etc/hosts" | |
| # ############################## | |
| # Change files visibility | |
| # ############################## | |
| alias hidden_on="defaults write com.apple.Finder AppleShowAllFiles YES && killall Finder" | |
| alias hidden_off="defaults write com.apple.Finder AppleShowAllFiles NO && killall Finder" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment