zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: zsh-3.1.5-pws-11: _bindkey
@ 1999-03-09 17:00 Andrej Borsenkow
  0 siblings, 0 replies; 3+ messages in thread
From: Andrej Borsenkow @ 1999-03-09 17:00 UTC (permalink / raw)
  To: zsh-workers

Trivial addition.

cheers
/andrej


--- Completion/Builtins/_bindkey	Tue Mar  9 16:26:35 1999
+++ /home/bor/.zsh.d/Completion/Builtins/_bindkey	Tue Mar  9 19:55:36 1999
@@ -3,5 +3,5 @@
 if [[ "$words[2]" = -*[DAN]* || "$words[CURRENT-1]" = -*M ]]; then
   compgen -s '$(bindkey -l)'
 else
-  compgen -b
+  compgen -b -M 'r:|-=* r:|=*'
 fi


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: PATCH: zsh-3.1.5-pws-11: _bindkey
  1999-03-10  9:48 Sven Wischnowsky
@ 1999-03-10 10:10 ` Peter Stephenson
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Stephenson @ 1999-03-10 10:10 UTC (permalink / raw)
  To: zsh-workers

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 <pws@ibmth.df.unipi.it>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: PATCH: zsh-3.1.5-pws-11: _bindkey
@ 1999-03-10  9:48 Sven Wischnowsky
  1999-03-10 10:10 ` Peter Stephenson
  0 siblings, 1 reply; 3+ messages in thread
From: Sven Wischnowsky @ 1999-03-10  9:48 UTC (permalink / raw)
  To: zsh-workers


borsenkow.msk@sni.de wrote:

> Trivial addition.
> 
> --- Completion/Builtins/_bindkey	Tue Mar  9 16:26:35 1999
> +++ /home/bor/.zsh.d/Completion/Builtins/_bindkey	Tue Mar  9 19:55:36 1999
> @@ -3,5 +3,5 @@
>  if [[ "$words[2]" = -*[DAN]* || "$words[CURRENT-1]" = -*M ]]; then
>    compgen -s '$(bindkey -l)'
>  else
> -  compgen -b
> +  compgen -b -M 'r:|-=* r:|=*'
>  fi

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.

Note, this is just a question, I'm not saying that we shouldn't do
it. With the global match specs I have, I get this behavior anyway and 
I even added something like that in `_long_options' to make Andrej
happy. Im just not sure...

Bye
 Sven


--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1999-03-10 10:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-03-09 17:00 PATCH: zsh-3.1.5-pws-11: _bindkey Andrej Borsenkow
1999-03-10  9:48 Sven Wischnowsky
1999-03-10 10:10 ` Peter Stephenson

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).