Created
May 16, 2023 15:59
-
-
Save archwisp/1dc54dbf41e51cb25e8df12b2d595342 to your computer and use it in GitHub Desktop.
.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
if [[ "$WINDOW" = "" ]]; then WINDOW="none"; fi | |
export HISTFILE=~/.bash_history.$WINDOW; | |
shopt -s histappend | |
HISTSIZE=10000 | |
HISTFILESIZE=20000 | |
alias fgrep="fgrep --color=auto" | |
alias grep="grep --color=auto" | |
export CLICOLOR=1 | |
export EDITOR=vim | |
export PATH=~/Tools:$PATH | |
export PATH=/usr/local/sbin:/opt/local/bin:/opt/local/sbin:$PATH | |
export PATH=/usr/local/go/bin:$PATH | |
export PATH=~/Library/Android/sdk/platform-tools/:$PATH | |
export PATH=/opt/homebrew/bin:$PATH | |
export PATH=/opt/homebrew/opt/binutils/bin:$PATH | |
export PATH=/opt/homebrew/opt/llvm/bin:$PATH | |
export LDFLAGS="-L/opt/homebrew/opt/binutils/lib $LDFLAGS" | |
export CPPFLAGS="-I/opt/homebrew/opt/binutils/include $CPPFLAGS" | |
export LDFLAGS="-L/opt/homebrew/opt/llvm/lib $LDFLAGS" | |
export CPPFLAGS="-I/opt/homebrew/opt/llvm/include $CPPFLAGS" | |
export PYENV_ROOT="$HOME/.pyenv" | |
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH" | |
eval "$(pyenv init -)" | |
eval "$(pyenv virtualenv-init -)" | |
# export JAVA_HOME=/usr/lib/jvm/jdk1.6.0_25 | |
# export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-13.jdk/Contents/Home | |
# export PATH=~/Library/Python/3.8/bin:$PATH | |
# export PATH=$PATH:~/.pyenv/shims/python:$PATH | |
# export PATH=$PATH:~/.gem/ruby/1.9.2/bin | |
# export NVM_DIR="$HOME/.nvm" | |
# [ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh" # This loads nvm | |
# [ -s "/usr/local/opt/nvm/etc/bash_completion.d/nvm" ] && . "/usr/local/opt/nvm/etc/bash_completion.d/nvm" # This loads nvm bash_completion | |
# export PATH="$PATH:$HOME/.rvm/bin" | |
COLOR_RED="\[\e[31;40m\]" | |
COLOR_GREEN="\[\e[32;40m\]" | |
COLOR_YELLOW="\[\e[33;40m\]" | |
COLOR_BLUE="\[\e[34;40m\]" | |
COLOR_MAGENTA="\[\e[35;40m\]" | |
COLOR_CYAN="\[\e[36;40m\]" | |
COLOR_RED_BOLD="\[\e[31;1m\]" | |
COLOR_GREEN_BOLD="\[\e[32;1m\]" | |
COLOR_YELLOW_BOLD="\[\e[33;1m\]" | |
COLOR_BLUE_BOLD="\[\e[34;1m\]" | |
COLOR_MAGENTA_BOLD="\[\e[35;1m\]" | |
COLOR_CYAN_BOLD="\[\e[36;1m\]" | |
COLOR_NONE="\[\e[0m\]" | |
promptFunc() | |
{ | |
PREV_RET_VAL=$?; | |
PS1="" | |
if [ `whoami` != "root" ] | |
then | |
PS1="${PS1}${COLOR_GREEN_BOLD}\u@\h ${COLOR_BLUE_BOLD}\w" | |
else | |
PS1="${PS1}${COLOR_RED_BOLD}\u@\h ${COLOR_BLUE_BOLD}\w" | |
fi | |
if [ $PREV_RET_VAL -eq 0 ] | |
then | |
PS1="${PS1} ${COLOR_BLUE_BOLD}\\$ ${COLOR_NONE}" | |
else | |
PS1="${PS1} ${COLOR_RED_BOLD}[${PREV_RET_VAL}] \\$ ${COLOR_NONE}" | |
fi | |
} | |
PROMPT_COMMAND="promptFunc; history -a"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment