dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit f301740f610a26d0af72082da1d99cbc2dc63b20
parent abc6907685400f7217b67f4624d03f4f72a0cd08
Author: Anders Damsgaard Christensen <adc@geo.au.dk>
Date:   Thu, 23 Aug 2012 20:16:54 +0200

.bashrc added

Diffstat:
A.bashrc | 97+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 97 insertions(+), 0 deletions(-)

diff --git a/.bashrc b/.bashrc @@ -0,0 +1,97 @@ +# ~/.bashrc: executed by bash(1) for non-login shells. +# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) +# for examples + +# MacPorts +#export PATH=/opt/local/bin:/opt/local/sbin:$PATH +#export MANPATH=/opt/local/share/man:$MANPATH + + +# If not running interactively, don't do anything +[ -z "$PS1" ] && return + +# don't put duplicate lines in the history. See bash(1) for more options +# ... or force ignoredups and ignorespace +HISTCONTROL=ignoredups:ignorespace + +# append to the history file, don't overwrite it +shopt -s histappend + +# for setting history length see HISTSIZE and HISTFILESIZE in bash(1) +HISTSIZE=1000 +HISTFILESIZE=2000 + +# check the window size after each command and, if necessary, +# update the values of LINES and COLUMNS. +shopt -s checkwinsize + +# make less more friendly for non-text input files, see lesspipe(1) +[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" + +# set a fancy prompt (non-color, unless we know we "want" color) +case "$TERM" in + xterm-color) color_prompt=yes;; +esac + +# uncomment for a colored prompt, if the terminal has the capability; turned +# off by default to not distract the user: the focus in a terminal window +# should be on the output of commands, not on the prompt +force_color_prompt=yes + +if [ -n "$force_color_prompt" ]; then + if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then + # We have color support; assume it's compliant with Ecma-48 + # (ISO/IEC-6429). (Lack of such support is extremely rare, and such + # a case would tend to support setf rather than setaf.) + color_prompt=yes + else + color_prompt= + fi +fi + +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 +unset color_prompt force_color_prompt + +if [ "$TERM" != "dumb" ]; then + export LS_OPTIONS='--color=auto' + eval `dircolors ~/.dir_colors` +fi + +# Useful aliases +alias ll='ls -alF' +alias la='ls -A' +alias l='ls -CF' +alias ls='ls $LS_OPTIONS -hF' +alias c="clear" + +# Set bash title for certain terminals +echo -n -e "\033]0;`hostname`\007" + +# Dircolors +export CLICOLOR=1 + +# Add path to my own custom executables: +export PATH=$HOME/bin:$PATH + +export GNUTERM='X11' + +export HISTTIMEFORMAT='%F %T ' + +export EDITOR=vim + +# Transparent xterm background +[ -n "$WINDOWID" ] && transset-df -i $WINDOWID >/dev/null + +complete -cf sudo + +# Locales +export LANG=en_DK.UTF-8 + +# The ls command will sort dotfiles first, followed by uppercase and lowercase filenames +export LC_ALL= +export LC_COLLATE="C" +