From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14815 invoked from network); 12 Aug 2002 10:43:56 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 12 Aug 2002 10:43:56 -0000 Received: (qmail 1282 invoked by alias); 12 Aug 2002 10:43:46 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 17531 Received: (qmail 1268 invoked from network); 12 Aug 2002 10:43:45 -0000 From: Bruno Bonfils To: "Bart Schaefer" Cc: zsh-workers@sunsite.dk Subject: Re: read timeout argument || completion of a function References: <87znvt15hr.fsf@julie.debian-fr.org> <1020812054520.ZM28574@candle.brasslantern.com> X-PGP-Fingerprint: F0DD DCA9 7B47 C51E C87A 857A F1D8 F87F F39D CCF5 Organization: Debian-Fr - http://www.debian-fr.org/ X-Face: @o?J05xY44=HO!,Yn~AiA7VC&~_D&T-,`h"mBykC}@-eyfLM"fE&Tq~,B{12{%?rR"ZbPbP QkZW~$a.;iSJKSeCkD++N}*_{xxCX_'./pId)1%"oem]sd9tc, "{") Date: Mon, 12 Aug 2002 12:43:08 +0200 Message-ID: <87n0rsxsqr.fsf@julie.debian-fr.org> User-Agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.2 (i386-debian-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii "Bart Schaefer" writes: > 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 ?) So, do you think it's difficult to add this argument to read builtin function ? > Meanwhile, if you install 4.1.0-dev-5 you can use the zselect > builtin. Ok, i note that > > } Moreover, i'm looking the way for provide completion for a > } function : > > This has nothing to do with wanting read to time out, right? sure.. > > } 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 hmm, i think i understand differences between tag completion and command completion > 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 ? i'm very sorry to ask and ask again about style, but i want to understand all. > > 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 > ' 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'? sure, in fact i have : % vi .zshrc ... source .zsh/rc/functions.rc fpath=($HOME/.zsh/functions $fpath) ... % vi .zsh/rc/functions.rc ... upgrade () { if [ -z $1 ] ; then sudo apt-get update sudo apt-get -u upgrade else echo "sudo apt-get update" | ssh $1 # ask before the upgrade local dummy echo "sudo apt-get --no-act upgrade" | ssh $1 echo -n "Process the upgrade ?" read -q dummy if [[ $dummy == "y" ]] ; then echo "sudo apt-get -u upgrade --yes" fi fi } ... % vi .zsh/functions/_upgrade #compdef upgrade _arguments '*:hostname:_hosts' % zcompile _upgrade source .zshrc upgrade file.. _upgrade host.. Thank you very much for your help, and sorry for the disturb. (btw sorry for the post to zsh-workers instead of users) -- Bruno Bonfils