Mercurial > dotfiles
annotate .zshrc @ 283:533bde18976e
find_dvcs_root: new function to find dvcs root dir more safely
This compares the discovered root dir lengths in order to give the
most specific repository path possible.
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Tue, 27 Mar 2012 13:41:40 -0500 |
parents | c65cc71d7ba1 |
children | c7e8311eb2ba |
rev | line source |
---|---|
0 | 1 # Augie Fackler's zshrc file |
2 | |
39
62bfb554ab85
Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
0
diff
changeset
|
3 for file in $(ls $HOME/.shell.d/*.{,z}sh) ; do |
62bfb554ab85
Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
0
diff
changeset
|
4 source $file |
0 | 5 done |
6 | |
7 # Login greeting ------------------ | |
8 | |
9 if [ ! "$SHOWED_SCREEN_MESSAGE" = "true" ]; then | |
39
62bfb554ab85
Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
0
diff
changeset
|
10 if which screen > /dev/null; then |
62bfb554ab85
Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
0
diff
changeset
|
11 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:
0
diff
changeset
|
12 if [ ! -z "$detached_screens" ]; then |
62bfb554ab85
Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
0
diff
changeset
|
13 echo "+---------------------------------------+" |
62bfb554ab85
Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
0
diff
changeset
|
14 echo "| Detached screens are available: |" |
62bfb554ab85
Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
0
diff
changeset
|
15 echo "$detached_screens" |
62bfb554ab85
Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
0
diff
changeset
|
16 echo "+---------------------------------------+" |
62bfb554ab85
Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
0
diff
changeset
|
17 fi |
62bfb554ab85
Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
0
diff
changeset
|
18 fi |
62bfb554ab85
Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
0
diff
changeset
|
19 export SHOWED_SCREEN_MESSAGE="true" |
0 | 20 fi |
21 | |
278
c65cc71d7ba1
zshrc: add a tmux variant of the detached screens message
Augie Fackler <raf@durin42.com>
parents:
39
diff
changeset
|
22 if [ ! "$SHOWED_TMUX_MESSAGE" = "true" ]; then |
c65cc71d7ba1
zshrc: add a tmux variant of the detached screens message
Augie Fackler <raf@durin42.com>
parents:
39
diff
changeset
|
23 if which tmux > /dev/null; then |
c65cc71d7ba1
zshrc: add a tmux variant of the detached screens message
Augie Fackler <raf@durin42.com>
parents:
39
diff
changeset
|
24 detached_screens=$(tmux ls | grep -v attached) |
c65cc71d7ba1
zshrc: add a tmux variant of the detached screens message
Augie Fackler <raf@durin42.com>
parents:
39
diff
changeset
|
25 if [ ! -z "$detached_screens" ]; then |
c65cc71d7ba1
zshrc: add a tmux variant of the detached screens message
Augie Fackler <raf@durin42.com>
parents:
39
diff
changeset
|
26 echo "+-----------------------------------------------------------+" |
c65cc71d7ba1
zshrc: add a tmux variant of the detached screens message
Augie Fackler <raf@durin42.com>
parents:
39
diff
changeset
|
27 echo "| Detached tmux sessions are available: |" |
c65cc71d7ba1
zshrc: add a tmux variant of the detached screens message
Augie Fackler <raf@durin42.com>
parents:
39
diff
changeset
|
28 echo "$detached_screens" |
c65cc71d7ba1
zshrc: add a tmux variant of the detached screens message
Augie Fackler <raf@durin42.com>
parents:
39
diff
changeset
|
29 echo "+-----------------------------------------------------------+" |
c65cc71d7ba1
zshrc: add a tmux variant of the detached screens message
Augie Fackler <raf@durin42.com>
parents:
39
diff
changeset
|
30 fi |
c65cc71d7ba1
zshrc: add a tmux variant of the detached screens message
Augie Fackler <raf@durin42.com>
parents:
39
diff
changeset
|
31 fi |
c65cc71d7ba1
zshrc: add a tmux variant of the detached screens message
Augie Fackler <raf@durin42.com>
parents:
39
diff
changeset
|
32 export SHOWED_TMUX_MESSAGE="true" |
c65cc71d7ba1
zshrc: add a tmux variant of the detached screens message
Augie Fackler <raf@durin42.com>
parents:
39
diff
changeset
|
33 fi |
c65cc71d7ba1
zshrc: add a tmux variant of the detached screens message
Augie Fackler <raf@durin42.com>
parents:
39
diff
changeset
|
34 |
0 | 35 # If available, source private extensions stored in a different repo |
36 if [[ -a ~/.private/zshrc ]]; then | |
37 source ~/.private/zshrc | |
38 fi | |
39 | |
40 if [[ -a ~/.zshrc-machine ]]; then | |
39
62bfb554ab85
Reorganize zsh files so that bash can work as well.
Augie Fackler <durin42@gmail.com>
parents:
0
diff
changeset
|
41 source ~/.zshrc-machine |
0 | 42 fi |