Mercurial > dotfiles
view .bashrc @ 12:0b38217ca1fd
added function returncode; included returncode in prompt; added alias lt
author | meillo@marmaro.de |
---|---|
date | Sat, 08 Dec 2007 20:19:23 +0100 |
parents | d339ec9b6545 |
children |
line wrap: on
line source
# markus schnalke -- http://marmaro.de # # modified standard bashrc of debian sarge # export LANG=en_US.UTF-8 # ~/.bashrc: executed by bash(1) for non-login shells. # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) # for examples # If not running interactively, don't do anything: [ -z "$PS1" ] && return # check the window size after each command and, if necessary, # update the values of LINES and COLUMNS. shopt -s checkwinsize # enable colored ls output eval "`dircolors -b $HOME/.dircolorsrc`" # one history for all shopt -s histappend PROMPT_COMMAND='history -a' export HISTCONTROL=ignoredups # larger history export HISTSIZE=100000 export HISTFILESIZE=$HISTSIZE # enable programmable completion features (you don't need to enable # this, if it's already enabled in /etc/bash.bashrc and /etc/profiles # sources /etc/bash.bashrc). if [ -f /etc/bash_completion ]; then . /etc/bash_completion fi # vars export PATH=$PATH:/home/meillo/Prog/Shell/bin export VISUAL=vim export EDITOR=vim export DEBEMAIL=meillo@marmaro.de export DEBFULLNAME="markus schnalke" # functions function ls { command ls -F --color=auto "$@" } function ll { ls -l "$@" } function lh { ls -lh "$@" } function la { ls -A "$@" } function lt { ls -lhtr "$@" } function dh { df -h "$@" } function cal { command cal -m "$@" } function xpdf { command xpdf -z page "$@" & } function dusch { du -sch * } function du1 { if [ "$*" = "" ] ; then du -h --max-depth=1 --exclude=".?*" "`pwd`" else du -h --max-depth=1 --exclude=".?*" "$@" fi } function du2 { if [ "$*" = "" ] ; then du -h --max-depth=2 --exclude=".?*" "`pwd`" else du -h --max-depth=2 --exclude=".?*" "$@" fi } function psgrep { ps -eaf | grep --color=auto -i "$1" } function returncode { returncode=$? if [ $returncode -ne 0 ] ; then echo "$returncode" fi } # aliases #alias fireworks='wine /usr/share/Fireworks4/Fireworks\ 4.exe' #alias stendhal='java -jar /home/meillo/Spiele/Stendhal/stendhal' # If this is an xterm set the title to user@host:dir case "$TERM" in xterm*|rxvt*) PROMPT_COMMAND=$PROMPT_COMMAND' ; echo -ne "\033]0;${HOSTNAME} | ${USER}\007"' ;; *) ;; esac # command prompt PS1='\033[01;31m$(returncode)\033[00m\n\033[01;31m<\033[00m \h \033[01;31m|\033[00m \u \033[01;31m|\033[00m \w \033[01;31m>\033[00m\n \$ '