zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: Bruno Bonfils <asyd@debian-fr.org>
Cc: zsh-workers@sunsite.dk
Subject: Re: read timeout argument || completion of a function
Date: Mon, 12 Aug 2002 12:13:47 +0100	[thread overview]
Message-ID: <20020812111347.GA5620@logica.com> (raw)
In-Reply-To: <87n0rsxsqr.fsf@julie.debian-fr.org>

On Mon, Aug 12, 2002 at 12:43:08PM +0200, Bruno Bonfils wrote:
> 
> > On Aug 11, 10:54pm, Bruno Bonfils wrote:
> > } 
> > } i'm very surprised to observe there isn't timeout argument for
> > } read builtin function.
> >
> > There are certain aspects of the arms race in which ksh is currently
> > ahead.  I suppose when it gets a builtin to launch satellites we'll
> > have to start working on moon landers.
> >
> I'm don't sure to understanding you at all. (maybe my sentence is
> meaningless ?) 

Your sentence is fine. There are just a few features in ksh that are
lacking in zsh and the timeout to read is one of them.
 
> So, do you think it's difficult to add this argument to read builtin
> function ? 

That is probably for Peter to say. It has been mentioned before and I'd
guess it is doable because zselect does roughly the same. It would
also need some nasty special casing for the argument parsing if we
maintain compatibility with both older zsh and ksh so that may have been
a factor in it not being implemented as yet. In the meantime, Bart's
suggestion of using zselect should provide what you need.

> > completion function.  The default completion is what is called when
> > there isn't any other completion defined, and it is implemented by a
> > function that is named _default, which happens to call another
> > function named _files.
> 
> hmm ok, i understand now. So, in this case, it's possible to change
> the function which called by _default for only one command using
> zstyle ?

Not with zstyle. You use compdef to define which function is called.

> sure, in fact i have :
> 
> % vi .zsh/functions/_upgrade
> 
> #compdef upgrade
> 
> _arguments '*:hostname:_hosts'
> 
> % zcompile _upgrade
> 

You could do that all more easily by just adding the line:

compdef _hosts upgrade

to your .zshrc.

Oliver

This e-mail and any attachment is for authorised use by the intended recipient(s) only.  It may contain proprietary material, confidential information and/or be subject to legal privilege.  It should not be copied, disclosed to, retained or used by, any other party.  If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender.  Thank you.


  reply	other threads:[~2002-08-12 11:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-11 20:54 Bruno Bonfils
2002-08-12  5:45 ` Bart Schaefer
2002-08-12 10:43   ` Bruno Bonfils
2002-08-12 11:13     ` Oliver Kiddle [this message]
2002-08-12 11:41       ` Peter Stephenson
2002-08-12 15:12         ` Bart Schaefer
2002-08-12 15:21     ` 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=20020812111347.GA5620@logica.com \
    --to=okiddle@yahoo.co.uk \
    --cc=asyd@debian-fr.org \
    --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).