zsh-workers
 help / color / mirror / code / Atom feed
From: Anthony Heading <anthony@magix.com.sg>
To: zsh-workers@sunsite.auc.dk
Subject: Re: A couple of questions on 'bindkey'
Date: Wed, 24 Mar 1999 01:39:48 +0800	[thread overview]
Message-ID: <36F7D1E4.EFF0B3F8@magix.com.sg> (raw)

Peter wrote:
> It's quite possible Zefram intended to add some way of doing this, given
> the existence of arbitrary keymaps.  Probably the most natural way is a new
> option to bindkey, e.g. `bindkey -S keymap' to select a keymap:  select is
> the word current used in the bindkey entry in the zshmodules manual page,
> and bindkey already takes a `-M keymap' option to choose which keymap to
> operate on, so this would fit.

Mmm hmm. There's sort-of the capacity to do that now by linking to
'main' with the bindkey -A option, but it's somewhat half-arsed. 
Ignoring for a moment if I may what's in place already, I imagined one
putative advantage of a KEYMAP variable is conceptually that it could be
local to a function, and restored implictly on exit using the normal
typeset mechanism.  (Not sure that this works for special variables, but
it might do).  However I'm sure that given the frequent resets to 'main'
of the current keymap that crashing out of a function in a different
keymap might not necessarily be a problem even without 'trap'
shenanigans.

But that's a very helpful answer.  If a shell param doesn't seem
obviously the appropriate way to handle setting such things as keymaps
then it's probably not worthwhile adding the complexity.

> Or do you mean the listing code for output, bs->firstseq etc.?  That's
> just a convenience to make the output neater.  Even there it doesn't need
> to know how the keys were originally *bound*, just how they happen to be in
> the current keymap. That's quite useful, since having the output
> " "-"~" self-insert
> is a big win compared with the other possibility of showing all 95
> characters.

Well, I meant the whole shebang really.  Case in point - I don't really
understand why you say the output " "-"~" is a big win.  Who wants this
in the first place?  And why are they grateful that it's 94 lines
shorter than it otherwise would be?  For me, it just breaks the ability
to do a simple regexp grep for no real benefit.

Anyhow, I conclude that the existing behaviour is not regarded as
especially egregious.  And as you say, it not exactly rocket science to
maintain.  So I'll try to preserve it.

Thanks

A


             reply	other threads:[~1999-03-23 17:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-03-23 17:39 Anthony Heading [this message]
  -- strict thread matches above, loose matches on Subject: below --
1999-03-22 20:05 Anthony Heading
1999-03-23  9:00 ` Peter Stephenson

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=36F7D1E4.EFF0B3F8@magix.com.sg \
    --to=anthony@magix.com.sg \
    --cc=zsh-workers@sunsite.auc.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).