Skip to content

Instantly share code, notes, and snippets.

@justsml

justsml/.bashrc

Created Jun 7, 2015
Embed
What would you like to do?
Production .bashrc example
# .bashrc
# ^^^^^^^ PRODUCTION SERVER SETUP ^^^^^^^
export NODE_ENV=production
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
# Color prompt!
color_prompt=yes
if [ "$color_prompt" = "yes" ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
# don't put duplicate lines or lines starting with space in the history.
HISTCONTROL=ignoredups
# append to the history file, don't overwrite it
shopt -s histappend
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# If set, the pattern "**" used in a pathname expansion context will
# match all files and zero or more directories and subdirectories.
# DON'T ENABLE - ** NEEDS TO BE RECURSIVE
# shopt -s globstar
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=2000
HISTFILESIZE=4000
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.