From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1442 invoked from network); 10 Mar 1999 10:26:46 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 10 Mar 1999 10:26:46 -0000 Received: (qmail 1610 invoked by alias); 10 Mar 1999 10:26:14 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 5729 Received: (qmail 1577 invoked from network); 10 Mar 1999 10:26:10 -0000 Message-Id: <9903101010.AA42544@ibmth.df.unipi.it> To: zsh-workers@sunsite.auc.dk Subject: Re: PATCH: zsh-3.1.5-pws-11: _bindkey In-Reply-To: "Sven Wischnowsky"'s message of "Wed, 10 Mar 1999 10:48:24 NFT." <199903100948.KAA16237@beta.informatik.hu-berlin.de> Date: Wed, 10 Mar 1999 11:10:16 +0100 From: Peter Stephenson Sven Wischnowsky wrote: > > + compgen -b -M 'r:|-=* r:|=*' > > I'd like to ask anyone if we should really do things like this. > Personally I would prefer to let the user use the global match > specs for things like this as otherwise the behavor might be somewhat > unexpected. Seems to me perfectly OK if it's documented. It's much more natural here than it is in file names, since the parts of widget names are often similar to one another, so much so that it's unlikely to produce any completion you weren't expecting, unless you mistyped. --- Completion/Builtins/_bindkey.doc Tue Mar 9 18:05:37 1999 +++ Completion/Builtins/_bindkey Wed Mar 10 11:06:07 1999 @@ -1,5 +1,12 @@ #defcomp bindkey +# Normally, this completes names of zle widgets, whether the builtin ones +# or ones defined by the user. Note that a - allows a wildcard before it, +# so h-b-s-b will complete to history-beginning-search-backward. You +# can alter this by removing the -M ... from the second compgen. +# +# Where appropriate, will complete keymaps instead of widgets. + if [[ "$words[2]" = -*[DAN]* || "$words[CURRENT-1]" = -*M ]]; then compgen -s '$(bindkey -l)' else -- Peter Stephenson Tel: +39 050 844536 WWW: http://www.ifh.de/~pws/ Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy