Mercurial > dotfiles
annotate .bashrc @ 121:8989839d4c6c
Rakefiles are ruby too.
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Thu, 02 Jul 2009 11:29:45 -0500 |
parents | f0f437b22cea |
children | 6a781c14cdfd |
rev | line source |
---|---|
39
62bfb554ab85
Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
5
diff
changeset
|
1 # This is more or less a clone of my .zshrc, with modifications as needed. |
62bfb554ab85
Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
5
diff
changeset
|
2 # The .zshrc is canonical, bash is simply the home-away-from-home when needed. |
0 | 3 |
39
62bfb554ab85
Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
5
diff
changeset
|
4 # one-off alias for a zsh reflex |
62bfb554ab85
Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
5
diff
changeset
|
5 alias ..='cd ..' |
62bfb554ab85
Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
5
diff
changeset
|
6 |
62bfb554ab85
Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
5
diff
changeset
|
7 for file in $(ls $HOME/.shell.d/*.{,ba}sh) ; do |
62bfb554ab85
Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
5
diff
changeset
|
8 source $file |
62bfb554ab85
Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
5
diff
changeset
|
9 done |
62bfb554ab85
Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
5
diff
changeset
|
10 |
62bfb554ab85
Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
5
diff
changeset
|
11 if [ ! "$SHOWED_SCREEN_MESSAGE" = "true" ]; then |
62bfb554ab85
Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
5
diff
changeset
|
12 if which screen > /dev/null; then |
62bfb554ab85
Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
5
diff
changeset
|
13 detached_screens=`screen -list | grep Detached | sed -e 's/ (Detached)//'` |
62bfb554ab85
Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
5
diff
changeset
|
14 if [ ! -z "$detached_screens" ]; then |
62bfb554ab85
Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
5
diff
changeset
|
15 echo "+---------------------------------------+" |
62bfb554ab85
Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
5
diff
changeset
|
16 echo "| Detached screens are available: |" |
62bfb554ab85
Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
5
diff
changeset
|
17 echo "$detached_screens" |
62bfb554ab85
Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
5
diff
changeset
|
18 echo "+---------------------------------------+" |
62bfb554ab85
Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
5
diff
changeset
|
19 fi |
62bfb554ab85
Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
5
diff
changeset
|
20 fi |
62bfb554ab85
Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
5
diff
changeset
|
21 export SHOWED_SCREEN_MESSAGE="true" |
62bfb554ab85
Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
5
diff
changeset
|
22 fi |
62bfb554ab85
Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
5
diff
changeset
|
23 |
62bfb554ab85
Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
5
diff
changeset
|
24 # If available, source private extensions stored in a different repo |
62bfb554ab85
Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
5
diff
changeset
|
25 if [[ -a ~/.private/bashrc ]]; then |
62bfb554ab85
Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
5
diff
changeset
|
26 source ~/.private/bashrc |
62bfb554ab85
Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
5
diff
changeset
|
27 fi |
62bfb554ab85
Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
5
diff
changeset
|
28 |
62bfb554ab85
Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
5
diff
changeset
|
29 # I really wish bash had something like .zshenv - maybe I just don't know what it is called? |
62bfb554ab85
Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
5
diff
changeset
|
30 if [[ "x$TZ" == "x" ]] ; then |
62bfb554ab85
Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
5
diff
changeset
|
31 export MACHINE_TZ="xNoTimeZone" |
42
f0f437b22cea
bash tweak (bash does not like local outside of functions)
Augie Fackler <durin42@gmail.com>
parents:
39
diff
changeset
|
32 DEFAULT_TZ="America/Detroit" |
39
62bfb554ab85
Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
5
diff
changeset
|
33 fi |
62bfb554ab85
Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
5
diff
changeset
|
34 |
62bfb554ab85
Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
5
diff
changeset
|
35 # Do this right before the timezone stuff |
62bfb554ab85
Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
5
diff
changeset
|
36 if [[ -a ~/.bashrc-machine ]]; then |
62bfb554ab85
Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
5
diff
changeset
|
37 source ~/.bashrc-machine |
62bfb554ab85
Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
5
diff
changeset
|
38 fi |
62bfb554ab85
Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
5
diff
changeset
|
39 |
62bfb554ab85
Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
5
diff
changeset
|
40 # do this last so that we can tell if .zshenv-machine set the timezone |
62bfb554ab85
Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
5
diff
changeset
|
41 if [[ "x$TZ" == "x" ]] ; then |
62bfb554ab85
Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
5
diff
changeset
|
42 if [ "$MACHINE_TZ" = "xNoTimeZone" ]; then |
62bfb554ab85
Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
5
diff
changeset
|
43 export TZ="$DEFAULT_TZ" |
62bfb554ab85
Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
5
diff
changeset
|
44 else |
62bfb554ab85
Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
5
diff
changeset
|
45 export TZ="$MACHINE_TZ" |
62bfb554ab85
Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
5
diff
changeset
|
46 fi |
62bfb554ab85
Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
5
diff
changeset
|
47 fi |