Mercurial > hg > config
comparison .bashrc @ 304:7ed290454f50
random cleanup but not much
| author | Jeff Hammel <jhammel@mozilla.com> |
|---|---|
| date | Tue, 14 May 2013 16:35:56 -0700 |
| parents | 266d6b337373 |
| children | fac01a1bcedf |
comparison
equal
deleted
inserted
replaced
| 303:266d6b337373 | 304:7ed290454f50 |
|---|---|
| 92 git-diff-master() { | 92 git-diff-master() { |
| 93 # differences of a git repository with master | 93 # differences of a git repository with master |
| 94 git diff $(git merge-base HEAD master) | 94 git diff $(git merge-base HEAD master) |
| 95 } | 95 } |
| 96 | 96 |
| 97 # nice fast find function | |
| 98 EXCLUDES="(\.svn)|(\.mo$)|(\.po$)|(\.pyc$)|(\.hg$)|(\.git$)" | 97 EXCLUDES="(\.svn)|(\.mo$)|(\.po$)|(\.pyc$)|(\.hg$)|(\.git$)" |
| 99 ff() { | 98 ff() { |
| 99 # nice fast find function | |
| 100 | 100 |
| 101 if (( $# < 2 )) | 101 if (( $# < 2 )) |
| 102 then | 102 then |
| 103 FILENAME='*' # default -- look in all files | 103 FILENAME='*' # default -- look in all files |
| 104 else | 104 else |
| 109 eval $CMD | 109 eval $CMD |
| 110 | 110 |
| 111 } | 111 } |
| 112 | 112 |
| 113 chainff() { | 113 chainff() { |
| 114 # chained fast find | |
| 115 | |
| 114 if (( $# < 2 )) | 116 if (( $# < 2 )) |
| 115 then | 117 then |
| 116 return 0 | 118 return 1 # bad invocation |
| 117 fi | 119 fi |
| 118 | 120 |
| 119 RESULTS=`ff "$2" "$1"` | 121 RESULTS=`ff "$2" "$1"` |
| 120 shift 2 | 122 shift 2 |
| 121 | 123 |
| 136 echo $i | 138 echo $i |
| 137 fi | 139 fi |
| 138 done | 140 done |
| 139 } | 141 } |
| 140 | 142 |
| 141 # contextual fastfind | 143 |
| 142 cff () { | 144 cff () { |
| 143 | 145 # contextual fastfind |
| 144 if (( $# < 2 )); then | 146 if (( $# < 2 )); then |
| 145 local FILENAME='*' # default -- look in all files | 147 local FILENAME='*' # default -- look in all files |
| 146 else | 148 else |
| 147 local FILENAME=$2 | 149 local FILENAME=$2 |
| 148 fi | 150 fi |
