summaryrefslogtreecommitdiff
path: root/.bashrc
diff options
context:
space:
mode:
authorJoerg Jaspert <joerg@debian.org>2008-09-26 23:53:11 +0200
committerJoerg Jaspert <joerg@debian.org>2008-09-26 23:53:11 +0200
commit55549160b6c25ebcb7d79e9b6af781b47cd8e229 (patch)
treed854669359ccde10a8a645e9a1e8ce5654588b82 /.bashrc
parent4442fd18932b6830cca20f9c6c34dde92912d647 (diff)
Bash
Add a bashrc/logout/profile Signed-off-by: Joerg Jaspert <joerg@debian.org>
Diffstat (limited to '.bashrc')
-rw-r--r--.bashrc46
1 files changed, 46 insertions, 0 deletions
diff --git a/.bashrc b/.bashrc
new file mode 100644
index 0000000..96fdfaa
--- /dev/null
+++ b/.bashrc
@@ -0,0 +1,46 @@
+# ~/.bashrc: executed by bash(1) for non-login shells.
+
+# If not running interactively, don't do anything
+[ -z "$PS1" ] && return
+
+export HISTCONTROL=ignoreboth
+
+# 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 "$(lesspipe)"
+
+# A little nice prompt.
+PS1='\[\033[01;33m\][`git branch 2>/dev/null|cut -f2 -d\* -s` ]\[\033[01;32m\]\u@\[\033[00;36m\]\h\[\033[01m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
+
+# 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
+
+# Alias definitions.
+
+# enable color support of ls and also add handy aliases
+eval "`dircolors -b`"
+alias ls='ls --color=auto'
+alias ll='ls -l'
+alias la='ls -A'
+alias l='ls -CF'
+
+alias cp='cp -i'
+alias mv='mv -i'
+
+alias ..='cd ..'
+
+# enable programmable completion features (you don't need to enable
+# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
+# sources /etc/bash.bashrc).
+if [ -f /etc/bash_completion ]; then
+ . /etc/bash_completion
+fi