rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
From: Byron Rakitzis <byron@rakitzis.com>
To: rc@hawkwind.utcs.toronto.edu, tjg@star.le.ac.uk
Subject: Re: New rc snapshot, includes "the equals hack"
Date: Tue, 15 Aug 2000 01:41:52 -0500	[thread overview]
Message-ID: <200008150541.WAA10934@rakitzis.com> (raw)

Paul and I sought an "equals hack" back in 1992 or so but for some reason
we were unable to come up with something clean.

The "equals hack" solves the "dd bug" and the "make bug" which are the two
most frequent uses of equals sign on the command line, at least for me.

As for the unexpected gluing of = to its neighbors, I suppose that is
the lesser evil -- rc already has this notion of "free carets" so it's
a bug which at least makes sense in that context.

I think what prevented me from doing this a while ago is that I was
trying to fix lexing of '=' in the lexical analyzer: this would have made
the scanning of '=' context-sensitive and it would avoid the unexpected
behavior of free-careting '=' to its neighbors. But, after some effort
I wasn't able to get this to work in a satisfactory way. It certainly
wasn't a one-line fix.

I don't know, what do other people think? In practical use, I can't see
that the equals hack is a bad thing.

You could always separate out the equals by quoting:

	echo a '=' b

Of course, the equals hack also has some non-obvious side-effects:

; echo a=  
syntax error
; echo a==
syntax error
; echo a==b
syntax error

One thing is for sure, it's a hack...


             reply	other threads:[~2000-08-15  6:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-08-15  6:41 Byron Rakitzis [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-08-23  1:03 Byron Rakitzis
2000-08-22  0:28 Byron Rakitzis
2000-08-22 23:23 ` Chris Siebenmann
2000-08-18 21:14 Bengt Kleberg
2000-08-15 20:25 smd
2000-08-15 14:32 smd
2000-08-15 22:51 ` Smarasderagd
2000-08-17  3:53   ` Decklin Foster
2000-08-21 23:21     ` Chris Siebenmann
2000-08-22 11:51       ` Carlo Strozzi
2000-08-17 10:49   ` Tim Goodwin
2000-08-15  7:28 Byron Rakitzis
2000-08-11 14:01 Tim Goodwin
2000-08-15  2:21 ` Paul Haahr
2000-08-15  4:21 ` Gary Carvell
2000-08-15 14:52 ` Mark K. Gardner

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200008150541.WAA10934@rakitzis.com \
    --to=byron@rakitzis.com \
    --cc=rc@hawkwind.utcs.toronto.edu \
    --cc=tjg@star.le.ac.uk \
    --subject='Re: New rc snapshot, includes "the equals hack"' \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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