> i seem to remember that russ's " and "" commands (which
> i've failed to find) just scan the console text for lines that start with the
> current prompt - which has its own disadvantages.
" is in my copy of p9p.
the history i added to rc is after the history added
to byron's rc which i'm told is after 8th ed unix.
but it's not the same. (and it's definately not
a readline-style thing.)
but i don't think i use history like most people do.
i use it to remember stuff i can remember i did, but
can't remember how i did it. sometimes i'm guilty of
using history to avoid cut-and-paste.
the history programs are - which runs the last command
to match its arguments. as in "- 8.out". and -p which
prints, rather than executes the match.
the rc part is a line added to the .y call whistory on
full productions, the whistory function and a small
change to deparsing (n1=';'). so it's interesting to note
1. multi-line productions are turned into 1 liners.
2. all rc's append to the same file.
#2 seems like a drawback, but it's really a bonus.
the general use case is something like this. i know
i generated a certificate for a year ago, i need another
one, but all i remember was that there were a lot of
steps. generally, information in $history remembers
enough.
the source for the history program is
and a well-aged copy of rc with history:
/n/sources/contrib/quanstro/src/history.c
/n/sources/contrib/quanstro/src/futharc.tbz
futharc has a few other changes that you might
find jarring. for example,
x=(1
2
3)
and there's a break, as in instead of this:
done = ()
while(~ $#done 0 && ! ~ $#* 0){
if(! test -f $dst.$1){
if(! cp $src/rawunix $dst.$1)
exit copy
done = 1
}
shift
}
this
for(i)
if(! test -f $dst.$i){
if(! cp $src/rawunix $dst.$i)
exit copy
break
}
subscript ranges like $x(2-) have been added to
rc already, so that's no longer wierd.
- erik