9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] rc
@ 2002-01-13  2:32 arisawa
  2002-01-13  3:37 ` Alexander Viro
  0 siblings, 1 reply; 4+ messages in thread
From: arisawa @ 2002-01-13  2:32 UTC (permalink / raw)
  To: 9fans

Hello,

The following result is curious for me.

term% a=(alice bob)
term% echo $a(1)/
alice /
term% b=$a(1)
term% echo $b/
alice/

Is this a specification or bug?

Kenji Arisawa
E-mail: arisawa@aichi-u.ac.jp


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

* Re: [9fans] rc
  2002-01-13  2:32 [9fans] rc arisawa
@ 2002-01-13  3:37 ` Alexander Viro
  0 siblings, 0 replies; 4+ messages in thread
From: Alexander Viro @ 2002-01-13  3:37 UTC (permalink / raw)
  To: 9fans; +Cc: 9fans



On Sun, 13 Jan 2002 arisawa@ar.aichi-u.ac.jp wrote:

> Hello,
>
> The following result is curious for me.
>
> term% a=(alice bob)
> term% echo $a(1)/
> alice /
> term% b=$a(1)
> term% echo $b/
> alice/
>
> Is this a specification or bug?

The former.  See the rules for implicit ^ insertion.



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

* Re: [9fans] rc
@ 2002-01-13 21:17 David Gordon Hogan
  0 siblings, 0 replies; 4+ messages in thread
From: David Gordon Hogan @ 2002-01-13 21:17 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 508 bytes --]

The following experiment, hopefully, provides further
insight into how the expression is parsed by rc, and how
adding a caret fixes the problem:

dhog% a=(alice bob)
dhog% fn f { echo $a(1)/ }
dhog% fn g { echo $a(1)^/ }
dhog% f
alice /
dhog% g
alice/
dhog% whatis f
fn f {echo $a(1) /}
dhog% whatis g
fn g {echo $a(1)^/}

Observe how rc does not insert a free caret into "$a(1)/".
Instead, the slash starts a new word.  I'm a little suprised
by that; I think I'd prefer a syntax error.


[-- Attachment #2: Type: message/rfc822, Size: 2011 bytes --]

From: Alexander Viro <viro@math.psu.edu>
To: 9fans@cse.psu.edu
Cc: 9fans@nx.aichi-u.ac.jp
Subject: Re: [9fans] rc
Date: Sat, 12 Jan 2002 22:37:22 -0500 (EST)
Message-ID: <Pine.GSO.4.21.0201122236100.24774-100000@weyl.math.psu.edu>



On Sun, 13 Jan 2002 arisawa@ar.aichi-u.ac.jp wrote:

> Hello,
>
> The following result is curious for me.
>
> term% a=(alice bob)
> term% echo $a(1)/
> alice /
> term% b=$a(1)
> term% echo $b/
> alice/
>
> Is this a specification or bug?

The former.  See the rules for implicit ^ insertion.

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

* [9fans] rc
@ 2000-11-23  0:03 arisawa
  0 siblings, 0 replies; 4+ messages in thread
From: arisawa @ 2000-11-23  0:03 UTC (permalink / raw)
  To: 9fans

Hello,

I tried RFNOMNT option of rfork.
cpu% rfork m
cpu% ls
rc: can't open #e/status
...

The error comes from the codes:
open("#e/status",...)

I think rc should open "/env/...", not "#e/...".
Some other errors comes from opening '#...', for example pipe.

Kenji Arisawa
E-mail: arisawa@aichi-u.ac.jp





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

end of thread, other threads:[~2002-01-13 21:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-13  2:32 [9fans] rc arisawa
2002-01-13  3:37 ` Alexander Viro
  -- strict thread matches above, loose matches on Subject: below --
2002-01-13 21:17 David Gordon Hogan
2000-11-23  0:03 arisawa

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