From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 19109 invoked from network); 11 Mar 2022 17:39:05 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 11 Mar 2022 17:39:05 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1647020345; b=lGCm6m0MXtdZJXCvVva0LFlZZlzYVU/9cFiK5+/sHFqBioPFwn0mRRORnv+vK11fpq8lJZcd+B 228rUN7/rhL1sOCqJtZ0wKdI8t2xNsqa/wTmxov1kmzBqTk2QbRpbg6WOxmBl35+XZzVAqvoO5 94X3A9YVmAtVwrQolcN3RKac87BfKxSjwyg6o2eJn1LzyvMnATAOB+7lWcrv+qGmmOvq/WvsNJ zSFgB7Q5chOCrxfT3QIEmzWIsx6GSXuybpija46C6x3PZ+m6zKWoHSiAzWtgLgoo6jyni0v8Wl aIHPyQCl7rdju03DiUsVKFl0bbhkDK9ncp6Z96NOXPfzzg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-io1-f53.google.com) smtp.remote-ip=209.85.166.53; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1647020345; bh=GdtgpEmqlF3lI9ZnxYSRqwFkdD2+zP81YFXoVqO/img=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=ouvNB6RRDNLpDJwGR6cLBUf9jnPLr08xWw1zLLxrFKbDiASH0SWXbxWxQj2pAfKbHYo2ZQ8tmF xlN9OTniryG2wpcYQmN0BJvxtNTvvBB01xcEaOiVQ/24VI+InOwKA7EzSuTq1QtTVcGbVzL/OI DCqYuZzyX1Sgt1i33VQFHXwkPHTyhXV/NbHyfWoOOhUCcszFPTfMtqt5d1iGLk44E1WlWRsXIc pcq2fx06wbds7Ng3Llx11A2QVmwRUudcycOdFV+vgqiklBPN8Hay5w1Lhqt7w2GU4Ty3VqGkFv 7JKlGsqbs+XSaz66isYCFUloyWpMFfa9DXeV5jtmBFM1Qg==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=8RHKp56Cy2RKjDb0VC5XSNoYLT9Vzrib08WnzZj9uJ0=; b=D0w3qeKbpZm8DI4v1lSg/9SF/E itX3En7mbaH8KdNntbLCdDGN/t+8PK+R7XbhNrFStBgBgbYFTuY+fMLraNUocCA4rbpEqqv/mecvF /chaN5aZS+A7E5uVNzpxHencVIPELz+PQjj2hpwOmTf2fqy8Aago43uTXXSd5v8n1ZYT3g+XdWRpd J/3/rixONYqcJR7jgj93LcR6aFHazfQXXFq2/n7Z0kdPaR6e8Ena+KZ8b69KZCteJDJuhvnmSTnHp 2L4VwDaYkp2JEhh23eRB9nhJpn488UWsYOYfDYMZeitzTokdo1q6Do6QYJR4mZyUGxPOla5JegMgc c8OHJIbg==; Received: from authenticated user by zero.zsh.org with local id 1nSjEF-0009vY-6n; Fri, 11 Mar 2022 17:39:03 +0000 Authentication-Results: zsh.org; iprev=pass (mail-io1-f53.google.com) smtp.remote-ip=209.85.166.53; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-io1-f53.google.com ([209.85.166.53]:45032) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1nSjDc-0009EH-5n; Fri, 11 Mar 2022 17:38:24 +0000 Received: by mail-io1-f53.google.com with SMTP id e22so10897718ioe.11 for ; Fri, 11 Mar 2022 09:38:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8RHKp56Cy2RKjDb0VC5XSNoYLT9Vzrib08WnzZj9uJ0=; b=PP7sh6cXNc5bTcCdV7Naw6+QtAA8+7u/ID5nUtmilBdMSj46zuU53zdf8CRVgcd3p3 yHGyUt4hns+z+Q+jpUr5rM1fAClZEc4PdGl2CphKT6kn+h0F/2UOQMf597FoaY2UMf1X 1/EPTOxUiYlumWp2agb72JRlhxYo06Bw6Go+r6VTlFHeZfDXKiFU9TimNPWDi2ws0XT6 5SNnkWIruy9Q37+G5M/udDu7n6sgRI+i3uFufxpUvBVSlMu4sBNfM5vzVqCy7zS7c1Wm /3VIdQkrfRFOZhIP00yShDtTIcw047eEOAQrupl8QrvXV3G/Xs1UKfXycl8RMWizqj60 wsYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8RHKp56Cy2RKjDb0VC5XSNoYLT9Vzrib08WnzZj9uJ0=; b=V7phU+a07MMav2yCg4iObo/xNUmV6IpoCCxuAOMyxOioPaem2BQUe28IGjQLCYbV+g SFfoaYv6CKifDZXp+xMn1ueKzV9Elz9qbiOQ8M/9H39mu/zfUrS2Dge2/TKiKt5DO2bi IsEYnBZOZMTfAMzJIUkPAP51pfiTBFphq5x2hJ7vk7GNR/bJnOdCqS0M9BffBpCp/Y48 PFb7GOZilA+L+Q+58yOE2S+uJaydsEwCCb4cTlfqKUd6EyulHyvsIVBTAUjT3duXU7mW bOH4PGbDoR7y2B1dGoOzvxbaBiMcMsHmhxbogbHfNkhc3A2iyyENimsqa/YpFmJ2Q5a5 dF6g== X-Gm-Message-State: AOAM5313WDLbDu3vFcob6qiKMi6KsgYpdLg4Jb7zRdsUeUDjh61TM0BD kmMhV+SUbzwFb3uoCuA9Pg4JCi31Vdu8pLwNm29j86SlDO8= X-Google-Smtp-Source: ABdhPJxjmsefd1C3h99ErDO1wD8XFnk5Dl/Ix35wcdndsqg7EAUMG6mepjS2AWFoAkkHAijtw2P4eF0NFjc9iFwB5iY= X-Received: by 2002:a02:3f48:0:b0:314:2352:1dcb with SMTP id c8-20020a023f48000000b0031423521dcbmr9650607jaf.246.1647020302605; Fri, 11 Mar 2022 09:38:22 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Pier Paolo Grassi Date: Fri, 11 Mar 2022 18:37:45 +0100 Message-ID: Subject: Re: completion inside vared To: Bart Schaefer Cc: Zsh-Users List Content-Type: multipart/alternative; boundary="00000000000013224c05d9f4cce6" X-Seq: 27547 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: --00000000000013224c05d9f4cce6 Content-Type: text/plain; charset="UTF-8" I will try to bump up this question once more, since I am stuck on this tldr: I would like to be able to use the send-break zle widget inside vared to exit it, but when I do, the history file is cropped to one line. Initially I had the same problem with ctrl-c, but I found out that a trap 'return 1' INT is able to prevent the behaviour in that case thanks for any further help Pier Paolo Grassi Il giorno lun 21 feb 2022 alle ore 22:55 Pier Paolo Grassi < pierpaolog@gmail.com> ha scritto: > >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 >> 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? >> > --00000000000013224c05d9f4cce6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I will try to bump up this question once more, since I am = stuck on this

tldr: I would like to be able to use the s= end-break zle widget inside vared to exit it, but when I do, the history fi= le is cropped to one line.
Initially=C2=A0I had the same problem = with ctrl-c, but I found out that a
trap 'return 1' INT
is able to prevent the behaviour in that case
<= br>
thanks for any further help

<= div>
= Pier Paolo Grassi


Il= giorno lun 21 feb 2022 alle ore 22:55 Pier Paolo Grassi <pierpaolog@gmail.com> ha scritto:
>Whi= ch history is getting lost?=C2=A0 The global shell history i.e. $HISTFILE?<= div>
no, before invoking vared I do

fc -p -a $file 20= 0 200

to have an history specific for the comm= and

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

= the history file is preserved after a ctrl-c.
If I instead do ctr= l-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 va= red, than send ctrl-g, the file contains then only=C2=A0

: 1645479991:0;./Desktop/

Is it possibl= e to catch=C2=A0send-break? is it implemented=C2=A0through a trappable sign= al?

thanks

Pi= er 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 $ funcst= ack), 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?=C2=A0 The global shell history i.e. $HISTFIL= E?

Have you tried exiting vared with ctrl-g ?=C2=A0 Does that have the same pr= oblem?
--00000000000013224c05d9f4cce6--