zsh-users
 help / color / mirror / code / Atom feed
From: Pier Paolo Grassi <pierpaolog@gmail.com>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: Zsh-Users List <zsh-users@zsh.org>
Subject: Re: completion inside vared
Date: Mon, 21 Feb 2022 22:55:27 +0100	[thread overview]
Message-ID: <CAP+y1xCREm6pzFgNZJCHXZa4JDr_mfKUm9fJLJiX_-C8ym+d8Q@mail.gmail.com> (raw)
In-Reply-To: <CAH+w=7aObBDB_mNgcvNOLp4Kn3=xO2Enrj18FOYgxgD+j+8i+w@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1440 bytes --]

>Which history is getting lost?  The global shell history i.e. $HISTFILE?
no, before invoking vared I do

fc -p -a $file 200 200

to have an history specific for the command

I just found out that replacing my previous trap with
trap 'return 1' INT

the history file is preserved after a ctrl-c.
If I instead do ctrl-g (send-break) the history file gets "cleaned" again
by cleaned I mean not really empty, but a file that contains just the first
row of the history, for example
if the history file contained:

: 1645479991:0;./Desktop/
: 1645480234:0;./Mail/
: 1645480247:0;./nltk_data/

and I enter vared, than send ctrl-g, the file contains then only

: 1645479991:0;./Desktop/

Is it possible to catch send-break? is it implemented through a trappable
signal?

thanks

Pier Paolo Grassi


Il giorno lun 21 feb 2022 alle ore 20:27 Bart Schaefer <
schaefer@brasslantern.com> ha scritto:

> On Sat, Feb 19, 2022 at 9:28 AM Pier Paolo Grassi <pierpaolog@gmail.com>
> wrote:
> >
> > yes that worked (apart from a space to be added between [[and $
> funcstack), thanks.
>
> Something to do with gmail line wrapping/unwrapping, sorry.
>
> > Is there something I can do to exit from vared with a key combination
> (ctrl-d only works if the line is empty) without losing the history?
>
> Which history is getting lost?  The global shell history i.e. $HISTFILE?
>
> Have you tried exiting vared with ctrl-g ?  Does that have the same
> problem?
>

[-- Attachment #2: Type: text/html, Size: 2333 bytes --]

  reply	other threads:[~2022-02-21 21:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-17 10:01 Pier Paolo Grassi
2022-02-18 23:08 ` Pier Paolo Grassi
2022-02-18 23:39   ` Bart Schaefer
2022-02-19 17:27     ` Pier Paolo Grassi
2022-02-21 19:27       ` Bart Schaefer
2022-02-21 21:55         ` Pier Paolo Grassi [this message]
2022-03-11 17:37           ` Pier Paolo Grassi

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=CAP+y1xCREm6pzFgNZJCHXZa4JDr_mfKUm9fJLJiX_-C8ym+d8Q@mail.gmail.com \
    --to=pierpaolog@gmail.com \
    --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).