Skip to content

Instantly share code, notes, and snippets.

@zaz
Created July 30, 2010 20:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zaz/501312 to your computer and use it in GitHub Desktop.
Save zaz/501312 to your computer and use it in GitHub Desktop.
miscellaneous configs
# Check for an interactive session:
[ -z "$PS1" ] && return
# Bash prompt: user@HOST [ dir ] $
PS1='\[\e[1;32m\]\u@\h [ \[\e[31m\]\w\[\e[32m\] ]$(__git_ps1 " [\[\e[31m\]%s\[\e[32m\]]" 2>/dev/null) \$ \[\e[0m\]'
#PS1='\[\u@\h [ \w ]$(__git_ps1 " (%s)" 2>/dev/null) \$ ' # Black & White
# History file:
shopt -s histappend
HISTCONTROL=ignoredups:ignorespace
HISTSIZE=1000
HISTFILESIZE=2000
# Detect window resizing:
shopt -s checkwinsize
# Enable programmable bash completion:
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
. /etc/bash_completion
fi
# Color ls and other common commands:
if [ -x /bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
alias dir='dir --color=auto'
alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
# Make `less` more non-text friendly
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
# Aliases:
if [ -f ~/.aliases ]; then . ~/.aliases; fi
[core]
whitespace = trailing-space,space-before-tab
[apply]
whitespace = fix
[color]
branch = auto
diff = auto
status = auto
Defaults env_reset,pwfeedback,editor=/usr/bin/nano,timestamp_timeout=0
# Rules
root ALL=(ALL) ALL
%admin ALL=(ALL) NOPASSWD: ALL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment