💾 Archived View for runjimmyrunrunyoufuckerrun.com › rc › s captured on 2021-12-17 at 13:26:06.
-=-=-=-=-=-=-
#!/bin/rc # to be run inside sam with ! # sets up a bunch of convenience functions and loads last dumped state # !u [fn...] # print sam fn usage fn u{ if(~ $#* 0) sed -n 's/^# ([_!^|><])/\1/p' /bin/s if not for(i) sed -n 's/^# ([_!^|><]'^$i^' )/\1/p' /bin/s } # ^b regex # jump to file fn b{echo 'X/'^$*^'/!B $%'} # ^+ [n] # increase indent fn +{ if(~ $%dot(2) $%dot(3)) echo , if(~ $1 [1-9]) echo 'x/^/i/'^`''{seq $1 | tr -d \xa | tr 1-9 ' '} if not echo 'x/^/i/ /' } # ^- [n] # decrease indent fn -{ if(~ $%dot(2) $%dot(3)) echo , if(~ $1 [1-9]) echo 'x/^'^`''{seq 9 | tail -$1 | tr -d \xa | tr 1-9 ' '}^/d if not echo 'x/^ /d' } # ^c [args] # test build and run for C programs fn c{ rfork e if(! ~ $% *.[ch]){ echo !echo not a c file! exit } echo w eval `{grep '^O=.