From 55549160b6c25ebcb7d79e9b6af781b47cd8e229 Mon Sep 17 00:00:00 2001 From: Joerg Jaspert Date: Fri, 26 Sep 2008 23:53:11 +0200 Subject: Bash Add a bashrc/logout/profile Signed-off-by: Joerg Jaspert --- .bash_logout | 7 +++++++ .bash_profile | 11 +++++++++++ .bashrc | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 64 insertions(+) create mode 100644 .bash_logout create mode 100644 .bash_profile create mode 100644 .bashrc 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 -- cgit v1.2.3