zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: PATCH: highlight pasted text
Date: Tue, 21 Jul 2015 10:35:53 -0700	[thread overview]
Message-ID: <150721103553.ZM15127@torch.brasslantern.com> (raw)
In-Reply-To: <14713.1437492198@thecus.kiddle.eu>

On Jul 21,  5:23pm, Oliver Kiddle wrote:
} Subject: Re: PATCH: highlight pasted text
}
} Bart wrote:
} > It'd make more sense to (for example) always show the PS2 prompt after
} > a paste that contains a newline, because that can both describe the
} > context and indicate that the shell is waiting for more input.
} 
} One disadvantage is that it wouldn't be compatible with the new feature
} of highlighting pasted text; at least not having the highlighting
} removed on the next action.
} 
} Another disadvantage is that PS2 in general is irritating for the
} fact that it restarts zle and push-line-or-edit tricks are needed on
} up-cursor to allow editing the prebuffer.

I didn't say "restart zle at the PS2 prompt" ... I just said to display
it.  It could be handled like RPS2 and immediately removed as soon as
more keystrokes are received, at the time that the highlighting goes.

} What would you use for the parser status that you get with %^ or %_?
} The pasted text might leave an open parser status or might not.

Hm.  Well, until there actually is an accept-line, the parser status
hasn't changed from when the paste began.  Perhaps just append a "+"
or a "?" to the current value of %_ to indicate that the parser has
yet to determine its state?

} As an aside, I recommend an empty $PS2 and transient_rprompt for RPS2
} so the PS2 prompt doesn't get in the way of attempts to copy multi-line
} commands with the mouse.

Yeah, this is a good idea.  I think I'll add

    RPS2="<${PS2%> }"
    PS2=''
    setopt transient_rprompt

or something akin to it, to prompt_bart_setup in the distribution.


  reply	other threads:[~2015-07-21 17:36 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-15 16:51 bracketed paste Yuri D'Elia
2015-07-15 17:33 ` Yuri D'Elia
2015-07-15 18:15   ` Mikael Magnusson
2015-07-15 18:43     ` Yuri D'Elia
2015-07-16  5:19 ` Oliver Kiddle
2015-07-16 14:32   ` Yuri D'Elia
2015-07-18  2:33     ` Oliver Kiddle
2015-07-18 11:55       ` Yuri D'Elia
2015-07-18 17:17       ` Bart Schaefer
2015-07-18 23:28         ` Oliver Kiddle
2015-07-19  8:13           ` Unmetafy of getsparam() Bart Schaefer
2015-07-21 20:07             ` Peter Stephenson
2015-07-21 23:08               ` Bart Schaefer
2015-07-23  8:50             ` Peter Stephenson
2015-07-16 20:15   ` bracketed paste Bart Schaefer
2015-07-18 12:05     ` Yuri D'Elia
2015-07-18 18:08       ` Bart Schaefer
2015-07-19  2:50         ` PATCH: highlight pasted text Oliver Kiddle
2015-07-19  8:17           ` Bart Schaefer
2015-07-19 12:13           ` Yuri D'Elia
2015-07-19 17:12             ` Daniel Shahaf
2015-07-19 18:10               ` Bart Schaefer
2015-07-21 15:23                 ` Oliver Kiddle
2015-07-21 17:35                   ` Bart Schaefer [this message]
2015-07-23  3:57                     ` Oliver Kiddle
2015-07-19 17:57             ` Oliver Kiddle
2015-07-19 18:09               ` Yuri D'Elia
2015-08-08 21:51               ` Daniel Shahaf
2015-08-14  1:38                 ` Oliver Kiddle
2015-08-14  5:28                   ` Bart Schaefer
2015-07-23  5:00           ` Mikael Magnusson
2015-07-23  6:23             ` Oliver Kiddle
2015-07-24  5:06               ` Bart Schaefer
2015-07-24  5:21                 ` Bart Schaefer
2015-07-24 22:22                   ` Oliver Kiddle
2015-07-24 23:13                     ` Bart Schaefer
2015-07-25  7:49                       ` Oliver Kiddle
2015-07-25 16:46                         ` zle options (was Re: PATCH: highlight pasted text) Bart Schaefer
2015-07-28  9:09                           ` Oliver Kiddle
2015-07-24 19:06                 ` Vim special marks - Re: PATCH: highlight pasted text Oliver Kiddle
2015-07-24 19:45                   ` Bart Schaefer
2015-08-11 11:16                   ` Oliver Kiddle
2015-08-13 23:14             ` Daniel Shahaf
2015-08-13 23:50               ` Bart Schaefer
2015-08-14  2:09                 ` Oliver Kiddle
2015-08-14  5:24                   ` Bart Schaefer

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=150721103553.ZM15127@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --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).