Skip to content

Instantly share code, notes, and snippets.

@ob-ivan
Last active August 8, 2019 12:32
Show Gist options
  • Save ob-ivan/cf6f78eccaabf463fecbc9177dcb1f7d to your computer and use it in GitHub Desktop.
Save ob-ivan/cf6f78eccaabf463fecbc9177dcb1f7d to your computer and use it in GitHub Desktop.
Do not disable umask
#
# my basic bashrc file
#
# USAGE:
#
# $ mkdir ~/github
# $ cd ~/github
# $ git clone [email protected]:cf6f78eccaabf463fecbc9177dcb1f7d.git bashrc
#
# Then add these lines to your .bashrc:
#
# BASHRC="$HOME/github/bashrc/.bashrc"
# [[ -f $BASHRC ]] && . $BASHRC
#
# Reload .bashrc or relogin, and it works!
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
export HISTCONTROL=ignoredups
export LANG=en_US.utf8
export LC_MESSAGES=en_US.utf8
export EDITOR=nano
# Prompt
export TERM=xterm-256color
GREEN="\[$(tput setaf 10)\]"
BLUE="\[$(tput setaf 12)\]"
RESET="\[$(tput sgr0)\]"
PROMPT_DIRTRIM=2
export PS1="[${GREEN}\u@\h${RESET}:${BLUE}\w${RESET}]\$ "
# xshell prompt
PROMPT_COMMAND_SOURCE="$HOME/github/prompt_command/.prompt_command"
[[ -f $PROMPT_COMMAND_SOURCE ]] && . $PROMPT_COMMAND_SOURCE
# grep related
alias egrep='egrep --color=auto'
alias grep='grep --color=auto'
# basic aliases
alias ls='ls --color=auto'
alias ll='ls -alv'
# git aliases
GITALIASES="$HOME/github/gitaliases/.gitaliases"
[[ -f $GITALIASES ]] && . $GITALIASES
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment