From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14500 invoked by alias); 21 Jul 2015 17:36:05 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 35843 Received: (qmail 27140 invoked from network); 21 Jul 2015 17:36:03 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.0 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version:content-type; bh=RWolo+y9s+LK72Pp4AuT8WZPntmQT8bnc6G0FKe4fas=; b=YEMYrrjq16Fqj/ZwY0CPzOt+/h1pAaZDwqe1q6nyvHQBKeje9ZuJBO2V2u4qen9zEr 2tMSH9v8Pd+pUmOYyIMgVvqlPzpy6UmDXxqoA/sEfp/IjHIRhkG9K3VLO/O/lLJSyULR UDmwUEZpnh+aSoe8SXuc2cB/YnTYtZ7jFg2C7sfwvZ4TJ4s68uenwKE6n/m/tbGJQRvj DLX+WFp6bpGF8ETtjeDsYnFEzivqmgWTgTq+Wl4pmh978rn8Ja+wk5ns6ZAtasgDnTUV WH09Dw3P9Gjo1J17A7HZFsUWLK9QcK0fD2KkJnsXcjsCvuJqI+hKoJtgVn/2cdM20Ooh 32IA== X-Gm-Message-State: ALoCoQkcLOQNnKPL6IzG7YCfPR48uSHxyFjws++tVZQ5Zs0FgY/krpvZGVfVPWcMprb0W+E4wfLi X-Received: by 10.60.34.164 with SMTP id a4mr34082206oej.56.1437500157513; Tue, 21 Jul 2015 10:35:57 -0700 (PDT) From: Bart Schaefer Message-Id: <150721103553.ZM15127@torch.brasslantern.com> Date: Tue, 21 Jul 2015 10:35:53 -0700 In-Reply-To: <14713.1437492198@thecus.kiddle.eu> Comments: In reply to Oliver Kiddle "Re: PATCH: highlight pasted text" (Jul 21, 5:23pm) References: <7277.1437023995@thecus.kiddle.eu> <150716131504.ZM18155@torch.brasslantern.com> <150718110859.ZM4405@torch.brasslantern.com> <19088.1437274234@thecus.kiddle.eu> <20150719171242.GD1900@tarsus.local2> <150719111044.ZM12632@torch.brasslantern.com> <14713.1437492198@thecus.kiddle.eu> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: PATCH: highlight pasted text MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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.