1.2
[olivier.git] / dotfiles / .bashrc
CommitLineData
dd4322d3
OL
1# ~/.bashrc: executed by bash(1) for non-login shells.
2# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
3# for examples
4
5# If not running interactively, don't do anything
6[ -z "$PS1" ] && return
7
8# don't put duplicate lines in the history. See bash(1) for more options
9export HISTCONTROL=ignoredups
10# ... and ignore same sucessive entries.
11export HISTCONTROL=ignoreboth
12
13# check the window size after each command and, if necessary,
14# update the values of LINES and COLUMNS.
15shopt -s checkwinsize
16
17# make less more friendly for non-text input files, see lesspipe(1)
18[ -x /usr/bin/lesspipe ] && eval "$(lesspipe)"
19
20# set variable identifying the chroot you work in (used in the prompt below)
21if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
22 debian_chroot=$(cat /etc/debian_chroot)
23fi
24
25# set a fancy prompt (non-color, unless we know we "want" color)
26case "$TERM" in
27xterm-color)
28 PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
29 ;;
30*)
31 PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
32 ;;
33esac
34
35# Comment in the above and uncomment this below for a color prompt
36#PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
37
38# If this is an xterm set the title to user@host:dir
39case "$TERM" in
40xterm*|rxvt*)
41 PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"'
42 ;;
43*)
44 ;;
45esac
46
47# Alias definitions.
48# You may want to put all your additions into a separate file like
49# ~/.bash_aliases, instead of adding them here directly.
50# See /usr/share/doc/bash-doc/examples in the bash-doc package.
51
52#if [ -f ~/.bash_aliases ]; then
53# . ~/.bash_aliases
54#fi
55
56# enable color support of ls and also add handy aliases
57if [ "$TERM" != "dumb" ]; then
58 eval "`dircolors -b`"
59 alias ls='ls --color=auto'
60 #alias dir='ls --color=auto --format=vertical'
61 #alias vdir='ls --color=auto --format=long'
62fi
63
64# some more ls aliases
65alias ll='ls -l'
66alias la='ls -A'
67alias l='ls -CF'
68alias lal='ls -al'
69
70# Mes alias d'admin
71alias adm='ssh arena sudo ssh'
72
73
74# enable programmable completion features (you don't need to enable
75# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
76# sources /etc/bash.bashrc).
77if [ -f /etc/bash_completion ]; then
78 . /etc/bash_completion
79fi
80
81# OLIVIER
82export EDITOR=vi
83alias dev='tmux att -d -t AUF'
84# releaser
85alias auf_release_mail='$HOME/.release_mail.sh'
86alias auf_release='python setup.py mregister sdist mupload -r auf'
87
88#virtualenv switch
89source /usr/local/bin/virtualenvwrapper.sh