From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21848 invoked by alias); 5 Mar 2015 10:10:19 -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: 34652 Received: (qmail 26865 invoked from network); 5 Mar 2015 10:10:17 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_PASS autolearn=ham version=3.3.2 X-AuditID: cbfec7f5-b7fc86d0000066b7-e0-54f828968b9c Date: Thu, 05 Mar 2015 09:59:44 +0000 From: Peter Stephenson To: zsh workers Subject: Re: PATCH: Don't store ZLE_LINE_ABORTED in vared context Message-id: <20150305095944.5bce20ab@pwslap01u.europe.root.pri> In-reply-to: References: Organization: Samsung Cambridge Solution Centre X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrKLMWRmVeSWpSXmKPExsVy+t/xa7rTNH6EGPR08lscbH7I5MDoserg B6YAxigum5TUnMyy1CJ9uwSujD1bepgLFnFV/G9fytTA2M3RxcjJISFgIvH6+V92CFtM4sK9 9WxdjFwcQgJLGSU+brwN5SxhkthydBsLhLONUaJ5y3GgDAcHi4CqxNYrYSDdbAKGElM3zWYE sUWAws3f/7GA2MICjhLHFp9lArF5BewlPnXOA7M5BYIlzn+YBlYjJBAgMe/MUmYQm19AX+Lq 309MEBfZS8y8coYRoldQ4sfke2D1zAJaEpu3NbFC2PISm9e8ZYaYoy5x4+5u9gmMQrOQtMxC 0jILScsCRuZVjKKppckFxUnpuUZ6xYm5xaV56XrJ+bmbGCFB+3UH49JjVocYBTgYlXh4C5K+ hQixJpYVV+YeYpTgYFYS4WVS/BEixJuSWFmVWpQfX1Sak1p8iJGJg1OqgfFWc/1LdZETUyWP RL98uS1/x73TZh5adhEG29ZHvptQvuSUreWG/75bd74848y3UnHZPA7eZJOG+npH0f1a9Sz3 Jziunrf1n6zOCtZ4Qxs5jWd7/9boTF0zv7L1ZYFWiUaBmMsphvN8/147zX505uunzFc2cTvf +PitsX0uuI1t6a/gL98Tpr5QYinOSDTUYi4qTgQA1Pz7lTgCAAA= On Wed, 4 Mar 2015 19:40:03 +0100 Mikael Magnusson wrote: > send-break (^G ESC-^G) (unbound) (unbound) > Abort the current editor function, e.g. execute-named-command, or the > editor itself, e.g. if you are in vared. Otherwise abort the parsing > of the current line; in this case the aborted line is available in the > shell variable ZLE_LINE_ABORTED. > > However, pressing ctrl-c inside vared stores whatever was being edited > in ZLE_LINE_ABORTED, which the above seems to imply should not happen. > The following adjusts the code accordingly. It was actually a bit > annoying if you set up a widget to do the up-line-or-aborted, because > it will grab the vared text as a command then. I'm not really sure I decided clearly one way or the other which was likely to be better, so it's more a matter for experience rather than the original intention. I do seem to have been fairly deliberate with the documentation, though; the "otherwise" doesn't seem to leave much doubt. Having the variable set in special cases is a bit of a headache, I agree, since you don't necessarily know they're there, even if there are ways round. It would be tempting to have a different variable for the vared case such as ZLE_VARED_ABORTED. pws