Mercurial > hg > config
comparison .bashrc @ 309:6095d439d1f2
new stuff! realwhich
| author | Jeff Hammel <jhammel@mozilla.com> | 
|---|---|
| date | Thu, 16 May 2013 23:27:18 -0700 | 
| parents | fac01a1bcedf | 
| children | a6cd6900419e | 
   comparison
  equal
  deleted
  inserted
  replaced
| 308:8be2beb2d952 | 309:6095d439d1f2 | 
|---|---|
| 279 mv "$1" "$NEWNAME" | 279 mv "$1" "$NEWNAME" | 
| 280 mv "$2" "$1" | 280 mv "$2" "$1" | 
| 281 mv "$NEWNAME" "$2" | 281 mv "$NEWNAME" "$2" | 
| 282 } | 282 } | 
| 283 | 283 | 
| 284 ### `which` commands | |
| 284 | 285 | 
| 285 whview() { | 286 whview() { | 
| 286 # which view | 287 # which view | 
| 287 less `which $@` | 288 less `which $@` | 
| 288 } | 289 } | 
| 289 | 290 | 
| 290 whemacs() { | 291 whemacs() { | 
| 291 # which emacs | 292 # which emacs | 
| 292 emacs -nw `which $@` | 293 emacs -nw `which $@` | 
| 294 } | |
| 295 | |
| 296 realwhich() { | |
| 297 # which -> real paths | |
| 298 command which $@ | while read line | |
| 299 do | |
| 300 python -c "import os; print os.path.realpath('${line}')" | |
| 301 done | |
| 293 } | 302 } | 
| 294 | 303 | 
| 295 ### functions for python | 304 ### functions for python | 
| 296 | 305 | 
| 297 pyfile() { | 306 pyfile() { | 
