From mboxrd@z Thu Jan 1 00:00:00 1970 From: trebol To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> In-Reply-To: References: <3850801494679010@web30j.yandex.ru> MIME-Version: 1.0 Message-Id: <5053931494776177@web35j.yandex.ru> Date: Sun, 14 May 2017 17:36:17 +0200 Content-Transfer-Encoding: 7bit Content-Type: text/plain Subject: Re: [9fans] equality sign in Rc Topicbox-Message-UUID: bccdacc8-ead9-11e9-9d60-3106f5b1d025 > 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 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.