Skip to content

Instantly share code, notes, and snippets.

@giladno
Last active July 31, 2018 11:34
Show Gist options
  • Save giladno/6b4fec7efa61057e6a5af6b9db140d9b to your computer and use it in GitHub Desktop.
Save giladno/6b4fec7efa61057e6a5af6b9db140d9b to your computer and use it in GitHub Desktop.
My bash_profile
export PS1="\[\033]0;\w\007\]\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ "
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
export LANG=en_US.UTF-8
alias ls='ls -GFh'
alias rgrep='ag --vimgrep'
alias rfind='find . | grep -i'
alias tldr='tldr -t ocean'
alias sizes='du -hd1'
export NODE_ENV=development
if [ $ITERM_SESSION_ID ]; then
export PROMPT_COMMAND='echo -ne "\033]0;${PWD/#$HOME/~}\007"';
fi
function g(){
gvim "$@" > /dev/null 2>&1
# vimr "$@" > /dev/null 2>&1
}
function search(){
rgrep --color=always --line-buffered $1 | sed -r '/^.{600,}$/d';
}
function man(){
env \
LESS_TERMCAP_mb="$(printf "\e[1;31m")" \
LESS_TERMCAP_md="$(printf "\e[1;31m")" \
LESS_TERMCAP_me="$(printf "\e[0m")" \
LESS_TERMCAP_se="$(printf "\e[0m")" \
LESS_TERMCAP_so="$(printf "\e[1;44;33m")" \
LESS_TERMCAP_ue="$(printf "\e[0m")" \
LESS_TERMCAP_us="$(printf "\e[1;32m")" \
man "${@}"
}
export PATH=/Users/gilad/Library/Android/sdk/tools:$PATH
export PATH=/Users/gilad/Library/Android/sdk/platform-tools:$PATH
export ANDROID_HOME=/Users/gilad/Library/Android/sdk
export PATH="$HOME/.fastlane/bin:$PATH"
#export ANDROID_NDK=/usr/local/share/android-ndk
#export ANDROID_SDK_ROOT=/usr/local/share/android-sdk
#export PATH=$PATH:$ANDROID_SDK_ROOT/tools:$ANDROID_SDK_ROOT/platform-tools
export GOPATH=$HOME/go
export GOROOT=/usr/local/opt/go/libexec
export PATH=$PATH:$GOPATH/bin:$GOROOT/bin
export FASTLANE_ITC_TEAM_NAME="Gilad Novik"
export PATH=/usr/local/opt/python/libexec/bin:$PATH
export AWS_SDK_LOAD_CONFIG=1
# export NVM_DIR=/Users/gilad/.nvm
# [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
###-begin-npm-completion-###
#
# npm command completion script
#
# Installation: npm completion >> ~/.bashrc (or ~/.zshrc)
# Or, maybe: npm completion > /usr/local/etc/bash_completion.d/npm
#
if type complete &>/dev/null; then
_npm_completion () {
local words cword
if type _get_comp_words_by_ref &>/dev/null; then
_get_comp_words_by_ref -n = -n @ -w words -i cword
else
cword="$COMP_CWORD"
words=("${COMP_WORDS[@]}")
fi
local si="$IFS"
IFS=$'\n' COMPREPLY=($(COMP_CWORD="$cword" \
COMP_LINE="$COMP_LINE" \
COMP_POINT="$COMP_POINT" \
npm completion -- "${words[@]}" \
2>/dev/null)) || return $?
IFS="$si"
}
complete -o default -F _npm_completion npm
elif type compdef &>/dev/null; then
_npm_completion() {
local si=$IFS
compadd -- $(COMP_CWORD=$((CURRENT-1)) \
COMP_LINE=$BUFFER \
COMP_POINT=0 \
npm completion -- "${words[@]}" \
2>/dev/null)
IFS=$si
}
compdef _npm_completion npm
elif type compctl &>/dev/null; then
_npm_completion () {
local cword line point words si
read -Ac words
read -cn cword
let cword-=1
read -l line
read -ln point
si="$IFS"
IFS=$'\n' reply=($(COMP_CWORD="$cword" \
COMP_LINE="$line" \
COMP_POINT="$point" \
npm completion -- "${words[@]}" \
2>/dev/null)) || return $?
IFS="$si"
}
compctl -K _npm_completion npm
fi
###-end-npm-completion-###
eval $(/usr/libexec/path_helper -s)
# The next line updates PATH for the Google Cloud SDK.
if [ -f '/Users/gilad/google-cloud-sdk/path.bash.inc' ]; then source '/Users/gilad/google-cloud-sdk/path.bash.inc'; fi
# The next line enables shell command completion for gcloud.
if [ -f '/Users/gilad/google-cloud-sdk/completion.bash.inc' ]; then source '/Users/gilad/google-cloud-sdk/completion.bash.inc'; fi
[ -f /usr/local/etc/bash_completion ] && . /usr/local/etc/bash_completion
export PATH="$HOME/.yarn/bin:$PATH"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment