zsh-workers
 help / color / mirror / code / Atom feed
* [[ as token
@ 1996-07-29 21:40 Achim Braemer
  1996-07-30  0:36 ` Wayne Davison
  1996-07-30  1:22 ` Achim Braemer
  0 siblings, 2 replies; 3+ messages in thread
From: Achim Braemer @ 1996-07-29 21:40 UTC (permalink / raw)
  To: zsh-workers


While not beeing active on the developement myself, and not knowing
about the intricacies of implementation, I do have a pretty strong
oppinion about the decision taken so abruptly in 3.0-pre4 to treat `[['
as a token that has to be surrounded by IFS.

The change broke some of my scripts that were using (maybe erroneously)
constructs like `if [[-x zsh ]]; then'. I am quite sure I happens to a
_lot_ of people. So I think the change will not be popular among
just-users like myself, especially since there is just no syntactic
reason why `[[' has to be surrounded by IFS.

So if this change is to be made there should be the possibility to
switch it off with an option. 

This would be a good idea anyway, because when zsh is invoked as ksh or
sh, parsing should be as close to these shells as possible, and scripts
should be enforced to be valid also under ksh or sh.

I am quite concerned that acceptance for the new release will be low if
it crashes very many existing scripts, whatever the good reason may be.
After all, we chose zsh because it is just so much _smarter_ than all
other shells...

-- Achim --


------------------------------------------------------------------------
 Achim Braemer              braemer@doc.physi.uni-heidelberg.de
 Physikalisches Institut    http://doc.physi.uni-heidelberg.de/~braemer
 Philosophenweg 12          Telephone: 06221 / 549370  Fax: 475733
 D-69120 Heidelberg         From DESY dial direct 6-207-9370
------------------------------------------------------------------------


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

* Re: [[ as token
  1996-07-29 21:40 [[ as token Achim Braemer
@ 1996-07-30  0:36 ` Wayne Davison
  1996-07-30  1:22 ` Achim Braemer
  1 sibling, 0 replies; 3+ messages in thread
From: Wayne Davison @ 1996-07-30  0:36 UTC (permalink / raw)
  To: Achim Braemer; +Cc: zsh-workers

Achim Braemer writes:
> This would be a good idea anyway, because when zsh is invoked as ksh or
> sh, parsing should be as close to these shells as possible

Here's what I get running the ksh that came with Solaris 2.5 for x86:

$ if [[-x /usr/local/bin/zsh]]; then echo hi; fi
ksh: [[-x:  not found
$ if [[ -x /usr/local/bin/zsh]]; then echo hi; fi
ksh: syntax error: `;' unexpected
$ if [[ -x /usr/local/bin/zsh ]]; then echo hi; fi
hi

So it looks like we're now much more compatible with ksh and sh (sh treats
"[[-x" the same way, though of course it doesn't parse "[[" by itself).

I think this is a positive step, but then I don't have any scripts that
broke because of this.  We can only guess what the collective response
to this will be.

..wayne..


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

* Re: [[ as token
  1996-07-29 21:40 [[ as token Achim Braemer
  1996-07-30  0:36 ` Wayne Davison
@ 1996-07-30  1:22 ` Achim Braemer
  1 sibling, 0 replies; 3+ messages in thread
From: Achim Braemer @ 1996-07-30  1:22 UTC (permalink / raw)
  To: zsh-workers, Wayne Davison

Achim Braemer writes on July 29:

Sorry, I was unclear:

 > So if this change is to be made there should be the 
 > possibility to switch it off with an option. 

should be:

 > necessity to switch it on with an option (for ksh compatibility).

-- Achim --


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

end of thread, other threads:[~1996-07-30  4:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-07-29 21:40 [[ as token Achim Braemer
1996-07-30  0:36 ` Wayne Davison
1996-07-30  1:22 ` Achim Braemer

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