zsh-workers
 help / color / mirror / code / Atom feed
From: "Daniel Shahaf" <d.s@daniel.shahaf.name>
To: zsh-workers@zsh.org
Subject: Re: Official plugin manager?
Date: Sat, 04 Jan 2020 17:35:32 +0000	[thread overview]
Message-ID: <b89e5960-20ef-46cf-a3a0-ec0b8071bf80@www.fastmail.com> (raw)
In-Reply-To: <CAN=4vMqYw4EuLosL2iXVPuz5uTL43mrSiqH3ptXqT41rst5fOg@mail.gmail.com>

Roman Perepelitsa wrote on Sat, 04 Jan 2020 16:41 +00:00:
> On Sat, Jan 4, 2020 at 5:28 PM Daniel Shahaf <d.s@daniel.shahaf.name> wrote:
> >
> > Roman Perepelitsa wrote on Sat, 04 Jan 2020 15:46 +00:00:
> > >     zle -N zle-line-init my-zle-line-init
> > >
> > > This works. Until we source a plugin after setting up bindings and the
> > > plugin happens to hook zle-line-init without calling our hook. This
> > > time it's the plugin breaking our code rather than vise versa.
> >
> > That plugin is broken.
> 
> Before crossing a road on green light, I first check if there are cars
> speeding through the intersection. It's illegal for them to do so, but
> I'd rather turn my head than die being right.

The plugin is something you installed in your own home directory of your
own free will; the hypothesized driver was not placed on the road by you
of your own free will.  The two are not analogous.

Complaining about not being able to do something because of a plugin
you had installed is like complaining that you have to sleep with
earplugs after inviting someone to practice playing the trumpet in the
guest bedroom.

> I don't know of a downside to key translation I mentioned earlier, so
> I'm not even paying the price of turning my head when I use it (or
> maybe I do and just don't know it?). If I were using terminfo to fetch
> the escape codes for home and end keys, I would still have to hardcode
> escape codes for other keys or key combinations as terminfo is rather
> sparse in this regard, and I would still have to handle NumLock the
> same way I do now. Am I missing something?

Your argument boils down to saying you won't use the zle-line-init
feature for anything because some plugin has appropriated it for
itself.  It seems that it was concluded under the constraint that
the plugin must be installed.  Just throw that constraint out and
use the obvious solution: deinstall the plugin and use zle-line-init
however you like.  (That's the entire point of this thread: that users
should be able to customize their configurations to their liking.)

(Or fix the plugin, as I pointed out in the part of the mail you had snipped.)

As to making home and end work, that's not zshrc's job.  There is very
little about the problem of mapping escape sequences to zle widgets that
varies per user.

  reply	other threads:[~2020-01-04 17:36 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-02  3:17 Sebastian Gniazdowski
2020-01-02  4:28 ` Eric Cook
2020-01-02 11:03 ` Daniel Shahaf
2020-01-02 11:37   ` Sebastian Gniazdowski
2020-01-02 11:55     ` Sebastian Gniazdowski
2020-01-02 21:30     ` dana
2020-01-03  0:25       ` Sebastian Gniazdowski
2020-01-03  1:36         ` dana
2020-01-03  2:43           ` Sebastian Gniazdowski
2020-01-03  2:45           ` Bart Schaefer
2020-01-03  3:26             ` dana
2020-01-03  5:13               ` Sebastian Gniazdowski
2020-01-03 15:00               ` Peter Stephenson
2020-01-03 20:48                 ` Daniel Shahaf
2020-01-03 21:51                   ` Roman Perepelitsa
2020-01-03 22:06                     ` Daniel Shahaf
2020-01-03 22:26                       ` Bart Schaefer
2020-01-03 22:37                       ` Roman Perepelitsa
2020-01-04  0:42                         ` dana
2020-01-04  1:06                           ` Daniel Shahaf
2020-01-04 15:46                           ` Roman Perepelitsa
2020-01-04 16:27                             ` Daniel Shahaf
2020-01-04 16:41                               ` Roman Perepelitsa
2020-01-04 17:35                                 ` Daniel Shahaf [this message]
2020-01-04 17:42                                   ` Roman Perepelitsa
2020-01-04 17:11                             ` Bart Schaefer
2020-01-05 10:40                               ` Oliver Kiddle
2020-01-06 17:47                   ` Leah Neukirchen
2020-01-03 11:15             ` Oliver Kiddle
2020-01-04  5:16               ` Sebastian Gniazdowski
2020-01-04  6:00                 ` Sebastian Gniazdowski
2020-01-02 12:00   ` Roman Perepelitsa
2020-01-02 12:21     ` Sebastian Gniazdowski
2020-01-02 12:27       ` Roman Perepelitsa

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=b89e5960-20ef-46cf-a3a0-ec0b8071bf80@www.fastmail.com \
    --to=d.s@daniel.shahaf.name \
    --cc=zsh-workers@zsh.org \
    /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).