Mac bashrc bash_profile - haiquang9994/dev_env GitHub Wiki
bashrc
export BASH_SILENCE_DEPRECATION_WARNING=1
export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced
parse_git_branch() {
git branch 2> /dev/null | sed -e "/^[^*]/d" -e "s/* \(.*\)/ (\1)/"
}
export PS1="\[\e[1;31m\]\u\[\e[m\] \[\e[36m\]\w\[\e[m\]\[\e[35m\]\$(parse_git_branch)\[\033[00m\] \n$ "
alias e="exit"
alias gs="git status"
alias gd="git diff"
alias gpl="git pull"
alias gps="git push"
alias gpp="gpl && gps"
alias cm="git commit -m"
alias cma="git commit -am"
alias cmaa="git add -A && cm"
alias fn="cd /Users/light/Developer/vhosts"
alias fw="cd /Users/light/Developer/www"
alias fa="cd /Users/light/Developer/app"
alias comi="composer install --prefer-dist"
alias comu="composer update --prefer-dist"
alias l="ls"
alias ll="l -al"
alias cmd="cmd.exe"
alias ..="cd .."
alias c="code ."
alias rssv="brew services restart nginx"
alias run_redis="sudo redis-server /usr/local/etc/redis.conf"
alias fdns="sudo killall -HUP mDNSResponder"
restart_sv() {
brew services restart nginx
brew services restart [email protected]
}
bash_profile
export PATH="/opt/homebrew/bin:$PATH"
[ -r "/opt/homebrew/etc/profile.d/bash_completion.sh" ](/haiquang9994/dev_env/wiki/--r-"/opt/homebrew/etc/profile.d/bash_completion.sh"-) && . "/opt/homebrew/etc/profile.d/bash_completion.sh"
# Setting PATH for Python 3.9
# The original version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.9/bin:${PATH}"
export PATH
export PATH="/Users/light/Developer/bin:$PATH"
export PATH="/opt/homebrew/opt/[email protected]/bin:$PATH"
export PATH="/opt/homebrew/opt/[email protected]/sbin:$PATH"
export PATH="/opt/homebrew/opt/[email protected]/bin:$PATH"
export PATH="/Users/light/Developer/flutter/bin:$PATH"
if [ -r ~/.bashrc ]; then
source ~/.bashrc
fi