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