rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
* Re:  -x -n
@ 1992-04-05  4:56 Byron Rakitzis
  0 siblings, 0 replies; 2+ messages in thread
From: Byron Rakitzis @ 1992-04-05  4:56 UTC (permalink / raw)
  To: rc, schwartz

Well, the prompt part is your prompt function getting imported from the
environment & interpreted by the rc parser. Since this happens only
once (and a good thing!) you only see it once. The "wrong name" is just
a convenient trick used to munge the environment string into something
the parser will recognize.

I suppose it is debatable whether rc -n should be interpreting fn
prompt at all---I hadn't thought of this up to now and offhand I
should say the answer is no. I will fix this.

Lists are parsed "backwards" because of yacc. Doing it the other way
would consume yacc stack space proportional to the length of the list.

Anyone up for writing a recursive-descent parser for rc? (just
kidding...)


^ permalink raw reply	[flat|nested] 2+ messages in thread

* -x -n
@ 1992-04-05  4:08 Scott Schwartz
  0 siblings, 0 replies; 2+ messages in thread
From: Scott Schwartz @ 1992-04-05  4:08 UTC (permalink / raw)
  To: rc


This is wierd:
; rc -x -n
fn x {switch($status){case [^'~'^0]*;echo '# status' $status;}}
; ls
ls

It prints my prompt function, but only once, and  without the correct
name.

One other wierdness...  lists print as, e.g.,
	path=((($minpath $miscpath) $nfspath) .)
That seems backwards to me.  Wouldn't
	path=($minpath ($miscpath ($nfspath .)))
be more aestetic?



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1992-04-05  4:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1992-04-05  4:56 -x -n Byron Rakitzis
  -- strict thread matches above, loose matches on Subject: below --
1992-04-05  4:08 Scott Schwartz

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).