Skip to content

Instantly share code, notes, and snippets.

@asrivascrealytee
Created February 22, 2019 11:58
Show Gist options
  • Save asrivascrealytee/4dbbe52e52bdac334b9dd78f176a548a to your computer and use it in GitHub Desktop.
Save asrivascrealytee/4dbbe52e52bdac334b9dd78f176a548a to your computer and use it in GitHub Desktop.
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# User specific environment
PATH="$HOME/.local/bin:$HOME/bin:$PATH"
export PATH
# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=90000
HISTFILESIZE=90000
# User specific aliases and functions
export GOROOT=/home/ankursrivastava/golang/go
export PATH=$PATH:~/go/bin
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
export FZF_DEFAULT_COMMAND='rg --type f'
export FZF_DEFAULT_COMMAND='rg --files --no-ignore-vcs --hidden'
export FZF_DEFAULT_COMMAND='fd --type file'
# Show long commands if needed
# From https://github.com/junegunn/fzf/wiki/Configuring-shell-key-bindings
# Bind F1 key to toggle preview window on/off
export FZF_CTRL_R_OPTS='--bind "F1:toggle-preview" --preview "echo {}" --preview-window down:3:hidden:wrap'
## Powerline related stuff
# Powerline shell
function _update_ps1() {
PS1=$(powerline-shell -newline $?)
}
if [[ $TERM != linux && ! $PROMPT_COMMAND =~ _update_ps1 ]]; then
PROMPT_COMMAND="_update_ps1; $PROMPT_COMMAND"
fi
#### Helper functions
offnen() { xdg-open "$@" ;}
# added by Anaconda3 2018.12 installer
# >>> conda init >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$(CONDA_REPORT_ERRORS=false '/home/ankursrivastava/anaconda3/bin/conda' shell.bash hook 2> /dev/null)"
if [ $? -eq 0 ]; then
\eval "$__conda_setup"
else
if [ -f "/home/ankursrivastava/anaconda3/etc/profile.d/conda.sh" ]; then
. "/home/ankursrivastava/anaconda3/etc/profile.d/conda.sh"
CONDA_CHANGEPS1=false conda activate base
else
\export PATH="/home/ankursrivastava/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda init <<<
#THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!
export SDKMAN_DIR="/home/ankursrivastava/.sdkman"
[[ -s "/home/ankursrivastava/.sdkman/bin/sdkman-init.sh" ]] && source "/home/ankursrivastava/.sdkman/bin/sdkman-init.sh"
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
export PATH="$PATH:$HOME/.rvm/bin"
# The next line updates PATH for the Google Cloud SDK.
if [ -f '/home/ankursrivastava/google-cloud-sdk/path.bash.inc' ]; then . '/home/ankursrivastava/google-cloud-sdk/path.bash.inc'; fi
# The next line enables shell command completion for gcloud.
if [ -f '/home/ankursrivastava/google-cloud-sdk/completion.bash.inc' ]; then . '/home/ankursrivastava/google-cloud-sdk/completion.bash.inc'; fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment