From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@9fans.net
Subject: Re: [9fans] Small program "PlanKey" (paraphrase of DOSKey)
Date: Fri, 23 Jan 2009 09:14:15 -0500 [thread overview]
Message-ID: <13708d20107a714eae65b2a88c02de79@quanstro.net> (raw)
In-Reply-To: <df49a7370901230456u6dd3e106s5127911492df7e85@mail.gmail.com>
> 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
next prev parent reply other threads:[~2009-01-23 14:14 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-23 10:03 pavel.klinkovsky
2009-01-23 10:50 ` Francisco J Ballesteros
2009-01-23 11:27 ` Pietro Gagliardi
2009-01-23 11:35 ` Pietro Gagliardi
2009-01-23 12:56 ` roger peppe
2009-01-23 14:14 ` erik quanstrom [this message]
2009-01-26 12:41 ` cej
2009-01-26 10:31 ` pavel.klinkovsky
2009-01-27 3:29 ` Roman Shaposhnik
2009-01-27 3:42 ` erik quanstrom
2009-01-27 4:43 ` Roman Shaposhnik
2009-01-27 6:35 ` Akshat Kumar
2009-01-27 6:44 ` Akshat Kumar
2009-01-27 20:01 ` Roman V. Shaposhnik
2009-01-27 20:10 ` erik quanstrom
2009-01-27 22:01 ` Roman V. Shaposhnik
2009-01-27 22:26 ` erik quanstrom
2009-01-27 22:58 ` sqweek
2009-01-27 23:42 ` erik quanstrom
2009-01-28 0:35 ` Anthony Sorace
2009-01-28 5:59 ` lucio
2009-01-28 19:00 ` erik quanstrom
2009-01-28 22:19 ` Joel C. Salomon
2009-01-28 22:51 ` Francisco J Ballesteros
2009-01-29 0:26 ` Akshat Kumar
2009-01-29 2:09 ` erik quanstrom
2009-01-29 8:49 ` cej
2009-01-29 11:50 ` Anthony Sorace
2009-01-29 13:04 ` roger peppe
2009-01-29 13:53 ` cej
2009-01-29 16:14 ` jimmy brisson
2009-01-29 13:53 ` erik quanstrom
2009-01-29 15:20 ` Akshat Kumar
2009-01-29 16:40 ` Roman V. Shaposhnik
2009-01-29 16:52 ` erik quanstrom
2009-01-29 17:03 ` Akshat Kumar
2009-01-29 17:09 ` Brian L. Stuart
2009-01-27 7:09 ` Russ Cox
2009-01-27 22:12 ` Roman V. Shaposhnik
2009-01-27 22:25 ` Christopher Nielsen
2009-01-27 22:31 ` Roman V. Shaposhnik
2009-01-27 22:43 ` Christopher Nielsen
2009-01-27 22:50 ` Roman V. Shaposhnik
2009-01-27 23:11 ` Christopher Nielsen
2009-01-27 23:40 ` Roman V. Shaposhnik
2009-01-28 3:15 ` Christopher Nielsen
2009-01-28 7:22 ` Eris Discordia
2009-01-27 23:01 ` sqweek
2009-01-26 10:31 ` pavel.klinkovsky
2009-01-27 3:21 ` Roman Shaposhnik
2009-01-27 9:37 ` Pavel Klinkovsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=13708d20107a714eae65b2a88c02de79@quanstro.net \
--to=quanstro@quanstro.net \
--cc=9fans@9fans.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).