From: Mikael Magnusson <mikachu@gmail.com>
To: Oliver Kiddle <okiddle@yahoo.co.uk>
Cc: zsh workers <zsh-workers@zsh.org>
Subject: Re: bracketed paste mode in xterm and urxvt
Date: Tue, 16 Jun 2015 01:09:42 +0200 [thread overview]
Message-ID: <CAHYJk3R+MEq+Qb++Z+0ZyPkmo107JoPJuUDJBkzHChiyZR-5kA@mail.gmail.com> (raw)
In-Reply-To: <20634.1434406318@thecus.kiddle.eu>
On Tue, Jun 16, 2015 at 12:11 AM, Oliver Kiddle <okiddle@yahoo.co.uk> wrote:
> On 9 Jun, Bart wrote:
>> This sounds like the same dilemma that we had with ZLE_RPROMPT_INDENT,
>> which we addressed with a variable rather than an option. This would
>> address several problems: namespace (ZLE-specific stuff should really
>> stop leaking into the base shell options); a place to store the string
>> to use in case it turns out not to be the same for all terminal types;
>> and distinguishing among unset/set/empty/non-empty semantics.
>
> That makes sense, thanks.
>
> So this next attempt uses ZLE_BRACKETED_PASTE_ON/OFF though I'm open to
> better ideas.
> I've not made them special, just initialised them with a call to
> setsparam as that seemed simple enough for the purpose. Is that
> reasonable or should they be special?
>
> I also looked around for places where keys are read and handled such
> that bracketedpaste() would not be called. I've not done anything in
> the case of single bytes such as for the vi r and f commands but I have
> added handling for the history and completion incremental searches and
> for the execute-named-command widget. It would be possible to avoid this
> special handling by adding logic to getkeycmd() so that they get a
> stream of self-insert widgets. That would somehow defeat the
> purpose of bracketed paste, however.
>
> In both the incremental search modes, backspace works like undo so the
> entire paste is undone. This same effect is also apparent if you press
> backspace after changing search direction with Ctrl-S or Ctrl-R.
>
> +int
> +bracketedpaste(UNUSED(char **args))
> +{
> + int n;
> + ZLE_STRING_T wpaste;
> + char *pbuf = bracketedstring();
> +
> + wpaste = stringaszleline((zmult == 1) ? pbuf :
> + quotestring(pbuf, NULL, QT_BACKSLASH), 0, &n, NULL, NULL);
> + zmult = 1;
This feature appears to be undocumented? I also think the
documentation for the widget should list the default bindings, as
other widgets do.
It might also be nice if the widget could take a parameter as an
argument to store the text in, rather than insert it into the command
line always.
--
Mikael Magnusson
next prev parent reply other threads:[~2015-06-15 23:09 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <BANLkTikh_-+L2W5=Yfu7h7iAe5CcpP6fxw@mail.gmail.com>
[not found] ` <CAFOazAOfk=Sq-smkMGzJKO4b7jMb_1_m4vXXn8twoVA2wV55YA@mail.gmail.com>
[not found] ` <55677AF5.50709@thequod.de>
[not found] ` <mk9dc0$p0$1@ger.gmane.org>
[not found] ` <CABZhJg_5p8BLbq82s_wVtsPdD5hVtk-cPg6fNxzbSs4Vg00SOw@mail.gmail.com>
[not found] ` <mkmjfu$3h0$1@ger.gmane.org>
[not found] ` <CAHYJk3T3dVdN5qDMecPAH_ALLBYNntW0QVdPMh50Lo_ULeWP6w__21110.9288772152$1433333265$gmane$org@mail.gmail.com>
2015-06-03 12:43 ` Stephane Chazelas
2015-06-03 15:31 ` Oliver Kiddle
2015-06-03 20:42 ` Stephane Chazelas
2015-06-03 23:48 ` Oliver Kiddle
2015-06-04 7:15 ` Stephane Chazelas
2015-06-05 10:49 ` Yuri D'Elia
2015-06-05 13:40 ` Oliver Kiddle
2015-06-05 14:35 ` Yuri D'Elia
2015-06-10 0:28 ` Oliver Kiddle
2015-06-10 4:38 ` Bart Schaefer
2015-06-15 22:11 ` Oliver Kiddle
2015-06-15 23:09 ` Mikael Magnusson [this message]
2015-06-16 0:20 ` Bart Schaefer
2015-06-16 17:12 ` Oliver Kiddle
2015-06-16 20:26 ` Bart Schaefer
2015-06-17 10:45 ` Oliver Kiddle
2015-06-17 15:04 ` Bart Schaefer
2015-06-10 9:44 ` Yuri D'Elia
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=CAHYJk3R+MEq+Qb++Z+0ZyPkmo107JoPJuUDJBkzHChiyZR-5kA@mail.gmail.com \
--to=mikachu@gmail.com \
--cc=okiddle@yahoo.co.uk \
--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).