Last active
January 23, 2017 22:07
-
-
Save rhberro/e1f490e83f3a68547e3890b076e84e8c to your computer and use it in GitHub Desktop.
My personal .bashrc file.
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
## Settings | |
# uncomment for a colored prompt, if the terminal has the capability; turned | |
# off by default to not distract the user: the focus in a terminal window | |
# should be on the output of commands, not on the prompt | |
force_color_prompt=yes | |
## Manually added. | |
# Apt | |
alias aptud="sudo apt-get update" | |
alias aptug="sudo apt-get upgrade" | |
alias apti="sudo apt-get install" | |
# Npm | |
export PATH="$PATH:/home/rafael/.node/bin" | |
alias npmi="npm install" | |
alias npmis="npm install --save" | |
alias npmiu="npm install && npm update" | |
alias npmu="npm update" | |
# Artisan | |
alias art="php artisan" | |
alias arts="php artisan serv" | |
# Gulp | |
alias gulpw="gulp watch" | |
# Composer | |
export PATH="$PATH:/home/rafael/.config/composer/vendor/bin" | |
alias compi="composer install" | |
alias compu="composer update" | |
alias compd="composer dump-autoload" | |
alias compr="composer require" | |
alias comprg="composer require global" | |
alias comprd="composer require --dev" | |
function composer() { COMPOSER="$(which composer)" || { echo "Could not find composer in path" >&2 ; return 1 ; } && sudo phpdismod -s cli xdebug ; $COM POSER "$@" ; STATUS=$? ; sudo phpenmod -s cli xdebug ; return $STATUS ; } | |
# Ruby | |
export PATH="/home/rafael/Public/ruby/rbenv/bin:$PATH" | |
export PATH="/home/rafael/Public/ruby/rbenv/plugins/ruby-build/bin:$PATH" | |
eval "$(rbenv init -)" | |
# Git | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
} | |
# Colors | |
if [ "$color_prompt" = yes ]; then | |
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[01;31m\]$(parse_git_branch)\[\033[00m\]\$ ' | |
else | |
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' | |
fi | |
# Travis | |
[ -f /home/rafael/.travis/travis.sh ] && source /home/rafael/.travis/travis.sh | |
# Nvm | |
export NVM_DIR="/home/rafael/.nvm" | |
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" | |
# Homestead | |
function homestead() { | |
( cd ~/Homestead && vagrant $* ) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment