plan9fox/rc/bin/diffy
2011-03-30 18:29:07 +00:00

14 lines
277 B
Bash
Executable file

#!/bin/rc
# diffy [diff-opts] file... - diff file against yesterday's version(s)
rfork e
diffopts=()
while(! ~ $#* 0 && ~ $1 -* && ! ~ $1 --){
diffopts=($diffopts $1)
shift
}
if(~ $1 --)
shift
if(! ~ $#* 1)
diffopts=($diffopts -m)
for(f)
diff $diffopts `{yesterday $f} $f