comparison .bashrc @ 561:0d5cf87e5b7e

alias -> function
author Jeff Hammel <jhammel@mozilla.com>
date Tue, 03 Dec 2013 09:14:04 -0800
parents d15ee034bdf1
children 2daf6543e42c
comparison
equal deleted inserted replaced
560:d15ee034bdf1 561:0d5cf87e5b7e
33 33
34 # aliases 34 # aliases
35 alias awd="python -c 'import os; print os.path.realpath(\".\")'" 35 alias awd="python -c 'import os; print os.path.realpath(\".\")'"
36 alias currentpatch='echo `hg root`/.hg/patches/`hg qapp -v | tail -n 1 | cut -f 3 -d " "`' 36 alias currentpatch='echo `hg root`/.hg/patches/`hg qapp -v | tail -n 1 | cut -f 3 -d " "`'
37 alias datestamp='date +%Y%m%d%H%M%S' 37 alias datestamp='date +%Y%m%d%H%M%S'
38 alias distribute='python setup.py egg_info -RDb "" sdist register upload'
39 alias grep='grep --colour=auto' 38 alias grep='grep --colour=auto'
40 alias ls='ls --color=auto' 39 alias ls='ls --color=auto'
41 alias patch='patch --reject-file=-' 40 alias patch='patch --reject-file=-'
42 alias random="python -c 'import sys, random; foo = sys.argv[1:]; random.shuffle(foo); print \" \".join(foo)'" 41 alias random="python -c 'import sys, random; foo = sys.argv[1:]; random.shuffle(foo); print \" \".join(foo)'"
43 alias straceff="attach.py firefox --kill" 42 alias straceff="attach.py firefox --kill"
347 whemacs() { 346 whemacs() {
348 # which emacs 347 # which emacs
349 emacs -nw `realwhich $@` 348 emacs -nw `realwhich $@`
350 } 349 }
351 350
351
352 ### functions for python 352 ### functions for python
353 353
354 pyfile() { 354 pyfile() {
355 # python file path 355 # python file path
356 python -c "import $1; print $1.__file__" 356 python -c "import $1; print $1.__file__"
366 cd "${i}" 366 cd "${i}"
367 python setup.py develop 367 python setup.py develop
368 cd .. 368 cd ..
369 fi 369 fi
370 done 370 done
371 }
372
373 distribute() {
374 python setup.py egg_info -RDb "" sdist register upload develop
371 } 375 }
372 376
373 nearest-venv() { 377 nearest-venv() {
374 if [[ "$#" == "0" ]] 378 if [[ "$#" == "0" ]]
375 then 379 then