shithub: riscv

ref: f508dfaab17c0ec9519078db82c9d5b5f1ba76a5
dir: /rc/bin/diffy/

View raw version
#!/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