diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2015-02-06 09:13:42 +0900 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2015-06-08 08:34:01 +0900 |
commit | 723d4cbe6957d3ada5605efec2e5cbff4c2ff48a (patch) | |
tree | 6036ffdc218a1fbef4d09cea0759d90b307ddff5 | |
parent | 56bea3c589bb8ae0e8b34a9e40464dbcb43b216f (diff) | |
download | dotfiles-723d4cbe6957d3ada5605efec2e5cbff4c2ff48a.tar.gz |
slimmed down bashrc for use on Windows with Git Bash
-rw-r--r-- | .bashrc | 58 |
1 files changed, 1 insertions, 57 deletions
@@ -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}$(</etc/DIR_COLORS)" -[[ -z ${match_lhs} ]] \ - && type -P dircolors >/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 |