comparison .bashrc @ 534:6ee5d5cca949

.bashrc
author Jeff Hammel <jhammel@mozilla.com>
date Thu, 26 Sep 2013 02:19:42 -0700
parents e1aa8835edb7
children 2c1543b5c78f
comparison
equal deleted inserted replaced
533:4f20f634f93f 534:6ee5d5cca949
164 FILE=$1 164 FILE=$1
165 shift 165 shift
166 emacs +`wc -l "$FILE"` $@ 166 emacs +`wc -l "$FILE"` $@
167 } 167 }
168 168
169 git-diff-master() { 169 ### find functionality
170 # differences of a git repository with master
171 git diff $(git merge-base HEAD master)
172 }
173 170
174 EXCLUDES="(\.svn)|(\.mo$)|(\.po$)|(\.pyc$)|(\.hg$)|(\.git$)" 171 EXCLUDES="(\.svn)|(\.mo$)|(\.po$)|(\.pyc$)|(\.hg$)|(\.git$)"
175 ff() { 172 ff() {
176 # nice fast find function 173 # nice fast find function
177 174
450 return 1 447 return 1
451 fi 448 fi
452 } 449 }
453 450
454 difffiles() { 451 difffiles() {
452 # which files are diffed; could use `lsdiff`
455 grep '^+++ ' $@ | sed 's/+++ b\///' 453 grep '^+++ ' $@ | sed 's/+++ b\///'
454 }
455
456 git-diff-master() {
457 # differences of a git repository with master
458 git diff $(git merge-base HEAD master)
459 }
460
461 git-diff-total() {
462 # diff of both added + modified files
463 combinediff <(git diff) <(git diff --cached)
456 } 464 }
457 465
458 hg-update-all() { 466 hg-update-all() {
459 # update all hg repositories in the current directory 467 # update all hg repositories in the current directory
460 for i in *; 468 for i in *;