zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: Zsh hackers list <zsh-workers@sunsite.dk>
Subject: Re: PATCH: `try' syntax
Date: Tue, 15 Jun 2004 12:31:20 +0200	[thread overview]
Message-ID: <6755.1087295480@trentino.logica.co.uk> (raw)
In-Reply-To: <Pine.LNX.4.44.0406141015190.32342-100000@toltec.zanshin.com>

Bart wrote:
> * A "shortloops" form "try { ... }" might be nice, or maybe should be the
> only form.

Or, thinking along those lines, you could use something like
{ ... } always { ... }
That currently finds a syntax error at always.

> * Rather than putting colons or some other unlikely character in front of
> the name, use plain words and start with them "disable"d, so that in order
> to use this syntax one must first "enable -r try always tried".  (This
> technique could apply to other extension syntax as well.)

That would be quite a good way of handling it. My main reservation
concerns the fact that it isn't possible to make the enabled/disabled
state of builtins local.

Consider _approximate. It'd be nice to use a try/always block to do the
job currently performed by a trap to unfunction compadd. So how do you
enable try and always but restore their original state when completion
exits. It's possible using the parameters module but would get fairly
messy. And we'd be wanting to re-disable `tried' from within an always
block.

Oliver


  reply	other threads:[~2004-06-15 10:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-14 11:23 Peter Stephenson
2004-06-14 12:58 ` Oliver Kiddle
2004-06-14 13:52   ` Peter Stephenson
2004-06-14 16:55     ` Oliver Kiddle
2004-06-14 17:27       ` Peter Stephenson
2004-06-14 18:14       ` Bart Schaefer
2004-06-15 10:31         ` Oliver Kiddle [this message]
2004-06-15 10:51         ` DervishD
2004-06-15 13:33         ` Peter Stephenson
2004-06-15 20:21           ` Bart Schaefer
2004-06-16 14:33             ` Oliver Kiddle
2004-06-16 17:21               ` Bart Schaefer
2004-06-18 11:05                 ` PATCH: second go at `always' blocks Peter Stephenson

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=6755.1087295480@trentino.logica.co.uk \
    --to=okiddle@yahoo.co.uk \
    --cc=zsh-workers@sunsite.dk \
    /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).