From 93870f46d85abc310eefe6d474e8de8c0d29b69e Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Fri, 6 Feb 2015 09:13:42 +0900 Subject: slimmed down bashrc for use on Windows with Git Bash --- .bashrc | 58 +--------------------------------------------------------- 1 file changed, 1 insertion(+), 57 deletions(-) diff --git a/.bashrc b/.bashrc index 445cc5d5..38b390bc 100644 --- a/.bashrc +++ b/.bashrc @@ -1,62 +1,6 @@ # --- preferences -# load standard environment variables -. $HOME/.shenv - -# don't put duplicate lines in the history. See bash(1) for more options -export HISTCONTROL=ignoredups -# ... and ignore same sucessive entries. -export HISTCONTROL=ignoreboth - -# make less more friendly for non-text input files, see lesspipe(1) -[ -x /usr/bin/lesspipe ] && eval "$(lesspipe)" - -# if this is an xterm set the title to user@host:dir -case "$TERM" in - xterm*|rxvt*) - PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"' - ;; - *) - ;; -esac - -# enable power-completion (shouldn't be necessary) -if [ -f /etc/bash_completion ]; then - . /etc/bash_completion -fi - -shopt -s globstar - -# --- colours originally from gentoo's default bashrc - -use_color=false -safe_term=${TERM//[^[:alnum:]]/?} # sanitize TERM -match_lhs="" -[[ -f ~/.dir_colors ]] && match_lhs="${match_lhs}$(<~/.dir_colors)" -[[ -f /etc/DIR_COLORS ]] && match_lhs="${match_lhs}$(/dev/null \ - && match_lhs=$(dircolors --print-database) -[[ $'\n'${match_lhs} == *$'\n'"TERM "${safe_term}* ]] && use_color=true - -if ${use_color} ; then - # Enable colors for ls, etc. Prefer ~/.dir_colors #64489 - if type -P dircolors >/dev/null ; then - if [[ -f ~/.dir_colors ]] ; then - eval $(dircolors -b ~/.dir_colors) - elif [[ -f /etc/DIR_COLORS ]] ; then - eval $(dircolors -b /etc/DIR_COLORS) - fi - fi - - PS1='\[\033[00;33m\]\h \[\033[00;32m\]\w \[\033[00;34m\]\$\[\033[00m\] ' - - alias ls='ls --color=auto' - alias grep='grep --colour=auto' -else - PS1='\h \w \$ ' -fi -unset use_color safe_term match_lhs +PS1='\[\033[00;33m\]\h \[\033[00;32m\]\w \[\033[00;34m\]\$\[\033[00m\] ' # --- aliases -- cgit v1.2.3