dotfiles

view .bashrc @ 10:d339ec9b6545

added bash function "dusch"; improved "du1" and "du2"
author meillo@marmaro.de
date Mon, 26 Nov 2007 16:18:45 +0100
parents c5e14bee7dbc
children 0b38217ca1fd
line source
1 # markus schnalke -- http://marmaro.de
2 #
3 # modified standard bashrc of debian sarge
4 #
6 export LANG=en_US.UTF-8
8 # ~/.bashrc: executed by bash(1) for non-login shells.
9 # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
10 # for examples
12 # If not running interactively, don't do anything:
13 [ -z "$PS1" ] && return
16 # check the window size after each command and, if necessary,
17 # update the values of LINES and COLUMNS.
18 shopt -s checkwinsize
21 # enable colored ls output
22 eval "`dircolors -b $HOME/.dircolorsrc`"
25 # one history for all
26 shopt -s histappend
27 PROMPT_COMMAND='history -a'
28 export HISTCONTROL=ignoredups
29 # larger history
30 export HISTSIZE=100000
31 export HISTFILESIZE=$HISTSIZE
34 # enable programmable completion features (you don't need to enable
35 # this, if it's already enabled in /etc/bash.bashrc and /etc/profiles
36 # sources /etc/bash.bashrc).
37 if [ -f /etc/bash_completion ]; then
38 . /etc/bash_completion
39 fi
42 # If this is an xterm set the title to user@host:dir
43 case "$TERM" in
44 xterm*|rxvt*)
45 PROMPT_COMMAND=$PROMPT_COMMAND' ; echo -ne "\033]0;title---${USER}@${HOSTNAME}: ${PWD}\007"'
46 ;;
47 screen*)
48 PROMPT_COMMAND=$PROMPT_COMMAND' ; echo -ne "\033]0;screen---${USER}@${HOSTNAME}: ${PWD}\007"'
49 ;;
50 *)
51 ;;
52 esac
55 # command prompt
56 PS1='\033[01;31m<\033[00m \h \033[01;31m|\033[00m \u \033[01;31m|\033[00m \w \033[01;31m>\033[00m\n \$ '
59 # vars
61 export PATH=$PATH:/home/meillo/Prog/Shell/bin
63 export VISUAL=vim
64 export EDITOR=vim
66 export DEBEMAIL=meillo@marmaro.de
67 export DEBFULLNAME="markus schnalke"
71 # functions
73 function ls {
74 command ls -F --color=auto "$@"
75 }
76 function ll {
77 ls -l "$@"
78 }
79 function lh {
80 ls -lh "$@"
81 }
82 function la {
83 ls -A "$@"
84 }
86 function dh {
87 df -h "$@"
88 }
90 function cal {
91 command cal -m "$@"
92 }
93 function xpdf {
94 command xpdf -z page "$@" &
95 }
97 function dusch {
98 du -sch *
99 }
100 function du1 {
101 if [ "$*" = "" ] ; then
102 du -h --max-depth=1 --exclude=".?*" "`pwd`"
103 else
104 du -h --max-depth=1 --exclude=".?*" "$@"
105 fi
106 }
107 function du2 {
108 if [ "$*" = "" ] ; then
109 du -h --max-depth=2 --exclude=".?*" "`pwd`"
110 else
111 du -h --max-depth=2 --exclude=".?*" "$@"
112 fi
113 }
115 function psgrep {
116 ps -eaf | grep --color=auto -i "$1"
117 }
119 # aliases
121 #alias fireworks='wine /usr/share/Fireworks4/Fireworks\ 4.exe'
122 #alias stendhal='java -jar /home/meillo/Spiele/Stendhal/stendhal'