zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@brasslantern.com>
To: Bruno Bonfils <asyd@debian-fr.org>, zsh-workers@sunsite.dk
Subject: Re: read timeout argument || completion of a function
Date: Mon, 12 Aug 2002 05:45:20 +0000	[thread overview]
Message-ID: <1020812054520.ZM28574@candle.brasslantern.com> (raw)
In-Reply-To: <87znvt15hr.fsf@julie.debian-fr.org>

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.

Meanwhile, if you install 4.1.0-dev-5 you can use the zselect builtin.

} Moreover, i'm looking the way for provide completion for a function :

This has nothing to do with wanting read to time out, right?

} First of all, i want to be sure i _can't_ define the default
} completion tag with zstyle for a command which don't have
} _command completion function (default tag called is _files isn't it
} ?).

You seem to be a bit confused about what's a tag and what's a 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.

The _files function looks for zstyles using several different tags; the
most general of these is "all-files", which is effectively the default
tag used for completion in the absence of any other configuration.
 
} I have also try to write a just little function _myping which contains 
} 
} #compdef myping
} 
} _arguments '*:hostname:_hosts'
} 
} but myping <tab> provide file completion, and _myping <tab> hosts
} completion.

One doesn't normally type the name of a completion function on the command
line; it's meant to be called only by the completion system (that's why it
has a leading underscore in the name).  If `_myping <TAB>' gives host
completion, you've somehow gotten _myping set up to complete for itself,
or some such.  Are you certain that the _myping file has `#compdef myping'
and not `#compdef _myping'?

You could get rid of your _myping function and instead use the command
`compdef myping=ping' which says to complete for myping the same way as
for ping ...

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


  reply	other threads:[~2002-08-12  5:46 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 [this message]
2002-08-12 10:43   ` Bruno Bonfils
2002-08-12 11:13     ` Oliver Kiddle
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=1020812054520.ZM28574@candle.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --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).