zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: zsh-workers@sunsite.dk
Subject: Re: PATCH: list bindings with given prefix.
Date: Tue, 3 Apr 2001 19:00:52 +0000	[thread overview]
Message-ID: <1010403190053.ZM30827@candle.brasslantern.com> (raw)
In-Reply-To: <3AC7453F.BECCB0B9@u.genie.co.uk>

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
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


      reply	other threads:[~2001-04-03 19:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-28 15:17 Peter Stephenson
2001-04-01 15:11 ` Oliver Kiddle
2001-04-03 19:00   ` Bart Schaefer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1010403190053.ZM30827@candle.brasslantern.com \
    --to=schaefer@candle.brasslantern.com \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).