Zsh Mailing List Archive
Messages sorted by:
Re: PATCH: list bindings with given prefix.
- X-seq: zsh-workers 13896
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: PATCH: list bindings with given prefix.
- Date: Tue, 3 Apr 2001 19:00:52 +0000
- In-reply-to: <3AC7453F.BECCB0B9@xxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <Tc0a88d01529276dc9f@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <3AC7453F.BECCB0B9@xxxxxxxxxxxxx>
On Apr 1, 4:11pm, Oliver Kiddle wrote:
} Subject: Re: PATCH: list bindings with given prefix.
} Peter Stephenson wrote:
} > This allows `bindkey -p <seq>' to list bindings which have <seq> as a
} > prefix (not counting bindings for <seq> 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
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
Messages sorted by: