zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: _bindkey
@ 2001-05-04 10:40 Oliver Kiddle
  2001-05-04 10:55 ` Peter Stephenson
  0 siblings, 1 reply; 2+ messages in thread
From: Oliver Kiddle @ 2001-05-04 10:40 UTC (permalink / raw)
  To: zsh-workers

This makes _bindkey cope with Peter's changes to bindkey in 14046.

The example in the docs (bindkey -rpM viins '^[') isn't completed
properly - the keymap and prefix are completed the wrong way around. I
think the way _arguments works is the better order but then I'd
probably always write this as something like bindkey -rp '^[' -M viins.

Oliver

Index: Completion/Zsh/Command/_bindkey
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Zsh/Command/_bindkey,v
retrieving revision 1.1
diff -u -r1.1 _bindkey
--- Completion/Zsh/Command/_bindkey	2001/04/02 11:25:59	1.1
+++ Completion/Zsh/Command/_bindkey	2001/05/04 10:17:14
@@ -14,7 +14,7 @@
   '(-v -a -M -l -D -A -N -p)-e[select emacs keymap and bind it to main]' \
   '(-e -a -M -l -D -A -N -p)-v[select viins keymap and bind it to main]' \
   '(-e -v -M -l -D -A -N -p)-a[select vicmd keymap]' \
-  '(-e -v -a -l -D -A -N -p)-M[specify keymap to select]:keymap:->keymap' \
+  '(-e -v -a -l -D -A -N)-M[specify keymap to select]:keymap:->keymap' \
   '(-e -v -a -M -D -A -N -m -p -r -s -R *)-l[list existing keymap names]' \
   '(-e -v -a -d -A -N -m -r -s -R *)-L[output in form of bindkey commands]' \
   '(-e -v -a -l -D -A -N -m -p -r -s -R *)-d[delete existing keymaps and reset to default state]' \
@@ -22,8 +22,8 @@
   '(-e -v -a -M -l -L -d -D -N -m -p -r -s -R *)-A[create alias to keymap]:old-keymap:->keymap:new-keymap:->keymap' \
   '(-e -v -a -M -l -L -d -D -A -m -p -r -s -R *)-N[create new keymap]:new-keymap:->keymap:old-keymap to copy:->keymap' \
   '(-l -L -d -D -A -N -p -r -s -r -R *)-m[add builtin meta-key bindings to selected keymape]' \
-  '(-e -v -a -M -d -D -A -N -m -r -s -R *)-p[list bindings which have given key sequence as a prefix]:key sequence' \
-  '(-l -L -d -D -A -N -m -p -s *)-r[unbind specified in-strings]:*:in-string' \
+  '(-e -v -a -d -D -A -N -m -s -R *)-p[list bindings which have given key sequence as a prefix]:key sequence' \
+  '(-l -L -d -D -A -N -m -s *)-r[unbind specified in-strings]:*:in-string' \
   '(-l -L -d -D -A -N -m -p -r *)-s[bind each in-string to each out-string]:*:key string' \
   '(-e -v -a -M -l -L -d -D -A -N -m -p)-R[interpret in-strings as ranges]' \
   '(-l -L -d -A -N -m -p -r -s)*::widgets:->widget' && ret=0

_____________________________________________________________________
This message has been checked for all known viruses by the 
MessageLabs Virus Scanning Service. For further information visit
http://www.messagelabs.com/stats.asp


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

* Re: PATCH: _bindkey
  2001-05-04 10:40 PATCH: _bindkey Oliver Kiddle
@ 2001-05-04 10:55 ` Peter Stephenson
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Stephenson @ 2001-05-04 10:55 UTC (permalink / raw)
  To: Zsh hackers list

> The example in the docs (bindkey -rpM viins '^[') isn't completed
> properly - the keymap and prefix are completed the wrong way around. I
> think the way _arguments works is the better order but then I'd
> probably always write this as something like bindkey -rp '^[' -M viins.

That doesn't work properly: `viins' isn't an argument to -M, it's the first
argument after the options (this confused me, too), and '^[' isn't an
argument to -p, it's the remaining argument (this should be more natural,
it's the way all the other forms of bindkey work).  You can rearrange the
`-rpm' bit, but you need to have those before the remaining two arguments,
which must be in that order.

-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR Ltd., Unit 300, Science Park, Milton Road,
Cambridge, CB4 0XL, UK                          Tel: +44 (0)1223 392070


**********************************************************************
The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential 
and/or privileged material. 
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by 
persons or entities other than the intended recipient is 
prohibited.  
If you received this in error, please contact the sender and 
delete the material from any computer.
**********************************************************************


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

end of thread, other threads:[~2001-05-04 10:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-04 10:40 PATCH: _bindkey Oliver Kiddle
2001-05-04 10:55 ` 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).