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