zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: Peter Stephenson <pws@ifh.de>,
	zsh-workers@math.gatech.edu (Zsh hackers list)
Subject: Re: cshjunkieparen bothers me (and always has)
Date: Tue, 2 Jul 1996 12:35:50 -0700	[thread overview]
Message-ID: <960702123554.ZM4790@candle.brasslantern.com> (raw)
In-Reply-To: Peter Stephenson <pws@ifh.de> "Re: cshjunkieparen bothers me (and always has)" (Jul  2, 10:48am)

On Jul 2, 10:48am, Peter Stephenson wrote:
} Subject: Re: cshjunkieparen bothers me (and always has)
}
} I have a vague feeling there were things which later got moved to
} CSH_JUNKIE_PAREN because they caused some problem with some strange sh
} syntax.  However, the patch looks fairly clean and I can't see how any
} valid sh syntax would fail.  Maybe the expedient of treating (..) and
} {..} the usual way has fixed things up.

Yes, I think that's it -- sh syntax would be broken if the (...) were
not treated as a subshell.  But there's no reason not to treat it as
a subshell, so ...

} > } If we really wanted a cshjunkieparen that meant something useful, it would
} > } mean that the parens were interpreted as [[ ... ]] like so:
} > } 
} > } 	if ( $TERM == xterm ) then
} > } 	    ...
} > } 	fi
} 
} I've got lost along the way somewhere.  I thought CSH_JUNKIE_PAREN
} (which I originally wrote some time ago) was once supposed to do that?

No, zsh hasn't ever interpreted parens that way.

} Otherwise what was the big deal?  If zsh has never treated the
} parentheses as a test, why was it advertised as a csh-compatibility
} feature?

I *think* this is what happened:

Cshjunkieparen at one time affected whether

	if [[ $TERM == xterm ]] then

would work.  This was the csh compatibility feature, even though it
wasn't precisely csh syntax.  I have no idea why "paren" was used in
the name of the option.

However, par_list() now permits empty statements, consuming all trailing
SEPER tokens; so by necessity par_if() no longer requires a SEPER before
the "then".

Thus the above began working even without cshjunkieparen, rendering
cshjunkieparen useless.

-- 
Bart Schaefer                             Brass Lantern Enterprises
http://www.well.com/user/barts            http://www.nbn.com/people/lantern

New male in /home/schaefer:
>N  2 Justin William Schaefer  Sat May 11 03:43  53/4040  "Happy Birthday"



  reply	other threads:[~1996-07-02 19:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-06-30  7:19 Bart Schaefer
1996-07-01 19:19 ` Bart Schaefer
1996-07-01 21:02   ` Zoltan Hidvegi
1996-07-01 21:35     ` Anthony Heading
1996-07-02  1:03       ` Bart Schaefer
1996-07-02  8:48   ` Peter Stephenson
1996-07-02 19:35     ` Bart Schaefer [this message]
1996-07-04 13:14       ` Zoltan Hidvegi
1996-07-04 15:58         ` Bart Schaefer

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=960702123554.ZM4790@candle.brasslantern.com \
    --to=schaefer@candle.brasslantern.com \
    --cc=pws@ifh.de \
    --cc=schaefer@nbn.com \
    --cc=zsh-workers@math.gatech.edu \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

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