9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: trebol <trebol55555@yandex.ru>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] equality sign in Rc
Date: Sun, 14 May 2017 17:36:17 +0200	[thread overview]
Message-ID: <5053931494776177@web35j.yandex.ru> (raw)
In-Reply-To: <CAOw7k5iBGmeSK-5Qko80EoBtKOiVCSvZuoQOgpXjPrdswbhgBQ@mail.gmail.com>

 > That isn't sh's rule. x=y is fine as an assignment without spaces.

Yes, sorry, in fact I was thinking on the contrary I wrote: don't set a variable like in sh.

I like the use of spaces permitted in rc, as I said.

> [...] Shell/environment variable assignments appear only before a command, as in rc,
> and otherwise the text gets passed to the command.[...]
> In rc, the unquoted = causes a syntax error because nothing in syn.y allows '=' after the start of <simple>

I see. It seems that you know the code very well. If the variable assignments are only before a command, why not permit =
after the command? Do you know if is there a thought reason for that?

> Perhaps instead of passing it to the command as in Unix, rc could do what sh originally intended, and lift named parameters
> into the environment wherever they appear in a command.

I think that the cleanest approach is to work with whatever you want to pass to a command, and then pass the result in a
not confusing way.
Variables are just fine, and with rc's lists of strings there is not need for more. The use of = in command arguments
should be prohibited (by law!).

By the way, do you know how this was designed in the original rc for v10 research unix?

I looked some time ago in

   http://www.tuhs.org/Archive/Distributions/Research/

but there is no source of rc, only documentation.

trebol.



  reply	other threads:[~2017-05-14 15:36 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-13 12:36 trebol
2017-05-13 13:42 ` Charles Forsyth
2017-05-13 14:21   ` trebol
2017-05-13 16:53     ` Charles Forsyth
2017-05-13 22:41       ` Bruce Ellis
2017-05-14  9:56 ` Charles Forsyth
2017-05-14 15:36   ` trebol [this message]
2017-05-14 22:31     ` erik quanstrom
2017-05-15  8:58       ` Charles Forsyth
2017-05-15 11:48         ` trebol
2017-05-15 11:54           ` Charles Forsyth
2017-05-15 11:55             ` Charles Forsyth
2017-05-15 11:56             ` Charles Forsyth
2017-05-15 15:37               ` Erik Quanstrom
2017-05-15 15:42                 ` Charles Forsyth
2017-05-15 15:54                   ` Erik Quanstrom
2017-05-15 15:59                     ` Charles Forsyth
2017-05-15 16:30                       ` Giacomo Tesio
2017-05-15 16:36                         ` Charles Forsyth
2017-05-15 18:25                           ` Giacomo Tesio
2017-05-15 16:43                         ` trebol
2017-05-15 18:33                           ` trebol
2017-05-15 21:06                             ` Charles Forsyth
2017-05-15 21:48                               ` trebol
2017-05-15 23:38                                 ` trebol
2017-05-15 23:59                                   ` trebol
2017-05-14 22:36     ` trebol
2017-05-14 22:38 ` erik quanstrom
2017-05-15 11:35   ` hiro
2017-05-15 11:45     ` trebol
  -- strict thread matches above, loose matches on Subject: below --
2017-05-15 19:32 sl
2017-05-15 20:15 ` Erik Quanstrom
2017-05-16 17:11 ` Kurt H Maier
2017-05-16 18:27   ` hiro
2017-05-16 18:40   ` Giacomo
2017-05-15 16:44 trebol
2017-05-15 21:02 ` Charles Forsyth
2017-05-16  9:24 ` Charles Forsyth
2017-05-16 15:59   ` Erik Quanstrom
2017-05-16 17:07     ` Giacomo Tesio
2017-05-01 19:27 dexen deVries
2017-05-06  1:53 ` tty0
2017-05-06  7:43   ` Sean Callanan
2017-05-06 13:20     ` Steve Simon
2017-05-06 19:09       ` Sean Callanan
2017-05-06 20:14     ` Nick Owens

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=5053931494776177@web35j.yandex.ru \
    --to=trebol55555@yandex.ru \
    --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).