summaryrefslogtreecommitdiff
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
parent4442fd18932b6830cca20f9c6c34dde92912d647 (diff)
Bash
Add a bashrc/logout/profile Signed-off-by: Joerg Jaspert <joerg@debian.org>
-rw-r--r--.bash_logout7
-rw-r--r--.bash_profile11
-rw-r--r--.bashrc46
3 files changed, 64 insertions, 0 deletions
diff --git a/.bash_logout b/.bash_logout
new file mode 100644
index 0000000..de4f5f7
--- /dev/null
+++ b/.bash_logout
@@ -0,0 +1,7 @@
+# ~/.bash_logout: executed by bash(1) when login shell exits.
+
+# when leaving the console clear the screen to increase privacy
+
+if [ "$SHLVL" = 1 ]; then
+ [ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q
+fi
diff --git a/.bash_profile b/.bash_profile
new file mode 100644
index 0000000..1e817ce
--- /dev/null
+++ b/.bash_profile
@@ -0,0 +1,11 @@
+# ~/.bash_profile: executed by bash(1) for login shells.
+
+# include .bashrc if it exists
+if [ -f ~/.bashrc ]; then
+ . ~/.bashrc
+fi
+
+# set PATH so it includes user's private bin if it exists
+if [ -d ~/bin ] ; then
+ PATH=~/bin:"${PATH}"
+fi
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