Mercurial > hg > config
comparison .bashrc @ 260:eacc4c5ed628
add an alias for mozbuild bugs and cleanup a bit
| author | Jeff Hammel <jhammel@mozilla.com> |
|---|---|
| date | Tue, 15 Jan 2013 14:38:01 -0800 |
| parents | 6f3d12f17847 |
| children | 102305dad796 |
comparison
equal
deleted
inserted
replaced
| 259:1e3b8c99597a | 260:eacc4c5ed628 |
|---|---|
| 38 # bzconsole aliases for filing bugs | 38 # bzconsole aliases for filing bugs |
| 39 alias mozbase-bug="bz new Mozbase --cc ':wlach'" | 39 alias mozbase-bug="bz new Mozbase --cc ':wlach'" |
| 40 alias mozharness-bug="bz new 'Release Engineering: Automation (General)' --cc ':aki' --whiteboard 'mozharness'" | 40 alias mozharness-bug="bz new 'Release Engineering: Automation (General)' --cc ':aki' --whiteboard 'mozharness'" |
| 41 alias releng-bug="bz new 'Release Engineering: Automation (General)'" | 41 alias releng-bug="bz new 'Release Engineering: Automation (General)'" |
| 42 alias talos-bug="bz new Talos --cc ':jmaher' --cc ':BYK'" | 42 alias talos-bug="bz new Talos --cc ':jmaher' --cc ':BYK'" |
| 43 alias mozbuild-bug="bz new --product Core 'Build Config' --cc ':gps'" | |
| 43 | 44 |
| 44 # PROMPT | 45 # PROMPT |
| 45 PS1='│' | 46 PS1='│' |
| 46 PS2='.' | 47 PS2='.' |
| 47 PROMPT_COMMAND='echo -ne "\033]0;${SSH_CLIENT/*/$HOSTNAME:}${PWD/~/~}\007"' | 48 PROMPT_COMMAND='echo -ne "\033]0;${SSH_CLIENT/*/$HOSTNAME:}${PWD/~/~}\007"' |
| 124 do | 125 do |
| 125 if grep -il "$arg" "$i" &> /dev/null | 126 if grep -il "$arg" "$i" &> /dev/null |
| 126 then | 127 then |
| 127 touch /dev/null | 128 touch /dev/null |
| 128 else | 129 else |
| 129 i="" | 130 i="" |
| 130 break | 131 break |
| 131 fi | 132 fi |
| 132 done | 133 done |
| 133 if [ -n "$i" ] | 134 if [ -n "$i" ] |
| 134 then | 135 then |
| 149 for i in `ff "$1" "$FILENAME"`; do | 150 for i in `ff "$1" "$FILENAME"`; do |
| 150 echo -e "$CLR_GREEN--->>> ""$CLR_YELLOWBOLD""$i""$CLR_NOTHING" : | 151 echo -e "$CLR_GREEN--->>> ""$CLR_YELLOWBOLD""$i""$CLR_NOTHING" : |
| 151 grep --color=auto -i -n -C 3 "$1" $i | 152 grep --color=auto -i -n -C 3 "$1" $i |
| 152 done | 153 done |
| 153 | 154 |
| 154 } | 155 } |
| 155 | 156 |
| 156 # make a temporary file | 157 # make a temporary file |
| 157 tmpfile() { | 158 tmpfile() { |
| 158 | 159 |
| 159 if [ "$#" == "0" ] | 160 if [ "$#" == "0" ] |
| 224 killbyname() { | 225 killbyname() { |
| 225 # kill a process by name | 226 # kill a process by name |
| 226 kill `isrunning "$@" | awk '{ print $1 }' | onelineit.py` | 227 kill `isrunning "$@" | awk '{ print $1 }' | onelineit.py` |
| 227 } | 228 } |
| 228 | 229 |
| 229 | |
| 230 tf() { | |
| 231 if [[ $@ ]] | |
| 232 then | |
| 233 echo "true" | |
| 234 else | |
| 235 echo "false" | |
| 236 fi | |
| 237 } | |
| 238 | |
| 239 # full name | 230 # full name |
| 240 fn() { | 231 fn() { |
| 241 python -c "import os; print os.path.realpath('$*')" | 232 python -c "import os; print os.path.realpath('$*')" |
| 242 } | 233 } |
| 243 | 234 |
| 253 | 244 |
| 254 pyfile() { | 245 pyfile() { |
| 255 # python file name | 246 # python file name |
| 256 python -c "import $1; print $1.__file__" | 247 python -c "import $1; print $1.__file__" |
| 257 } | 248 } |
| 249 | |
| 250 ### functions for version control systems | |
| 258 | 251 |
| 259 svndance(){ | 252 svndance(){ |
| 260 # do the svn import dance! | 253 # do the svn import dance! |
| 261 if (( $# )) | 254 if (( $# )) |
| 262 then | 255 then |
| 272 | 265 |
| 273 difffiles() { | 266 difffiles() { |
| 274 grep '^+++ ' $@ | sed 's/+++ b\///' | 267 grep '^+++ ' $@ | sed 's/+++ b\///' |
| 275 } | 268 } |
| 276 | 269 |
| 277 hg-update-all() { | 270 hg-update-all() { |
| 278 for i in *; | 271 for i in *; |
| 279 do | 272 do |
| 280 if [ -e $i/.hg ] | 273 if [ -e $i/.hg ] |
| 281 then | 274 then |
| 282 cd $i | 275 cd $i |
| 283 hg pull | 276 hg pull |
| 304 hg push | 297 hg push |
| 305 fi | 298 fi |
| 306 cd - | 299 cd - |
| 307 } | 300 } |
| 308 | 301 |
| 309 blog-file() { | |
| 310 echo "$HOME/web/blog/k0s/entries/public/$1" | |
| 311 } | |
| 312 | |
| 313 hgrc() { | 302 hgrc() { |
| 314 ROOT="${1}" | 303 ROOT="${1}" |
| 315 echo "[paths]" | 304 echo "[paths]" |
| 316 echo "default = ${ROOT}" | 305 echo "default = ${ROOT}" |
| 317 echo "default-push = ssh://${ROOT#http*://}" | 306 echo "default-push = ssh://${ROOT#http*://}" |
| 307 } | |
| 308 | |
| 309 ### functions for web content | |
| 310 | |
| 311 blog-file() { | |
| 312 echo "$HOME/web/blog/k0s/entries/public/$1" | |
| 318 } | 313 } |
| 319 | 314 |
| 320 flatten() { | 315 flatten() { |
| 321 directory=$PWD | 316 directory=$PWD |
| 322 if [ "$#" == "1" ] | 317 if [ "$#" == "1" ] |
