From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16099 invoked from network); 3 Apr 2001 19:02:05 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 3 Apr 2001 19:02:05 -0000 Received: (qmail 14589 invoked by alias); 3 Apr 2001 19:01:35 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13896 Received: (qmail 14576 invoked from network); 3 Apr 2001 19:01:34 -0000 From: "Bart Schaefer" Message-Id: <1010403190053.ZM30827@candle.brasslantern.com> Date: Tue, 3 Apr 2001 19:00:52 +0000 In-Reply-To: <3AC7453F.BECCB0B9@u.genie.co.uk> Comments: In reply to Oliver Kiddle "Re: PATCH: list bindings with given prefix." (Apr 1, 4:11pm) References: <3AC7453F.BECCB0B9@u.genie.co.uk> X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.dk Subject: Re: PATCH: list bindings with given prefix. MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Apr 1, 4:11pm, Oliver Kiddle wrote: } Subject: Re: PATCH: list bindings with given prefix. } } Peter Stephenson wrote: } > } > This allows `bindkey -p ' to list bindings which have as a } > prefix (not counting bindings for itself). } } How do I use this to list all key bindings which are Meta something: You don't; Meta isn't a prefix. Stick with `bindkey | fgrep \"\\M` ... } bindkey -p \\M } doesn't work. The -p option is using getkeystring(), which returns an empty string when parsing a \M by itself. It might be possible to special-case it, but \M is not a real character any more than \C is, and the current implemention needs at least one character of prefix to compare with. (Do you expect to be able to list all control-character bindings with `bindkey -p ^' ? } Also, I've just noticed that the output of bindkey includes these: } } "^\^" up-case-word } "^\^[OA" up-history } "^\^[OB" down-history } "^\^[OC" forward-char } "^\^[OD" backward-char } "^\^[[A" up-history } "^\^[[B" down-history } "^\^[[C" forward-char } "^\^[[D" backward-char } } The first one is set from this command in my .zshrc: } bindkey '^^' up-case-word } but I don't see where the back-slash came from. In double quotes, a backslash quotes the following character and then is removed, so "^\^" is the same as "^^", and not the same as "^\\" (which to bindkey is control-backslash). I don't know why bindkey decided it needs to backslash the second carat. } I also don't see why the others should start with ^\. I don't know where } they come from - after zsh -f followed by . ./.zshrc, they aren't there That part has me stumped. -- 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