From: Hong Xu <hong@topbug.net>
To: Bart Schaefer <schaefer@brasslantern.com>, zsh-users@zsh.org
Subject: Re: ZLE_LINE_ABORTED: how to restore the last non-blank aborted line?
Date: Thu, 29 Sep 2016 00:32:09 -0700 [thread overview]
Message-ID: <e5f293ed-a4a8-a2e2-0d25-1156144534bd@topbug.net> (raw)
In-Reply-To: <160929001257.ZM27763@torch.brasslantern.com>
[-- Attachment #1.1: Type: text/plain, Size: 941 bytes --]
On 09/29/2016 12:12 AM, Bart Schaefer wrote:
> On Sep 27, 9:11pm, Hong Xu wrote:
> }
> } ZLE_LINE_ABORTED would turn empty if ^C is pressed on an empty line
> } disregarding what it was. This is annoying since sometimes auto
> } completion stuck and more than one ^C is used to cancel that.
> }
> } Is there any way to preserve it in this case in zsh?
>
> Can you give a more specific example? Normally any buffer preceding
> the line on which the abort occurred is already in the history and can
> be recalled with up-line-or-history et al.; ZLE_LINE_ABORTED is only
> needed to capture lines that haven't yet been added to history.
>
Sure. For example,
emacs path/to/some/file
Now assume that the tab completion stucks at this point and the user
accidentally presses two ^C to cancel that. Now, ZLE_LINE_ABORTED is
empty but the user would prefer to restore the line "emacs
path/to/some/file".
Hong
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-09-29 7:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-28 4:11 Hong Xu
2016-09-29 7:12 ` Bart Schaefer
2016-09-29 7:32 ` Hong Xu [this message]
2016-09-29 7:50 ` Mikael Magnusson
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=e5f293ed-a4a8-a2e2-0d25-1156144534bd@topbug.net \
--to=hong@topbug.net \
--cc=schaefer@brasslantern.com \
--cc=zsh-users@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).