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=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 9761 invoked from network); 5 Aug 2020 11:15:42 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 5 Aug 2020 11:15:42 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=Sender:List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Content-Type:Cc:To:Subject:Message-ID:Date: From:References:In-Reply-To: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=dultl1pjm4JCG9EixPgbn2xmCjVIcF6QnJUiICb6Dd8=; b=SHdKDv6iz6oVYZo+B+fzd5T83X IL0a5JPb7deJu09NJ60i4w0Jt15VoU9lXy9AdWiFIW/lt+Ok+onyAx0jX2KUq+nP2Q5E8/71CTorf vfQfOoq/++aZyMMDmtzSoCh1hWOiCvK8zBb7ug5/ux47+ocmZxOSKku98deGV5d8iqEqPNY9yD+wE /+cFLEzAJN9jFSmNWnJtkKSeExWekpsl6dkjLetVCBkgMk3YvXr1RzrlkzRke3sITila4uraYx0Ag uEOKeOnCrfSqItFFPAI5X4xwW6BOI48MX+Z4rhvGqPoxJPLX/2ZOY81ISJCSpxVFWLPK9WJlqkkSf 3hLVscKw==; Received: from authenticated user by zero.zsh.org with local id 1k3HOR-0008IR-IB; Wed, 05 Aug 2020 11:15:35 +0000 Authentication-Results: zsh.org; iprev=pass (mail-il1-x143.google.com) smtp.remote-ip=2607:f8b0:4864:20::143; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256 Received: from mail-il1-x143.google.com ([2607:f8b0:4864:20::143]:37831) by zero.zsh.org with esmtp id 1k3HLl-0007Ni-3V; Wed, 05 Aug 2020 11:12:49 +0000 Received: by mail-il1-x143.google.com with SMTP id p13so8515765ilh.4 for ; Wed, 05 Aug 2020 04:12:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=dultl1pjm4JCG9EixPgbn2xmCjVIcF6QnJUiICb6Dd8=; b=aUf00OUOJ+eXiRb1OLrMOItgF6VsWCBOrO9+4sNjXcLI2+8eyPcYMPat7kfL7Xk9JW iil0XUkfV2jL6L5wZbtptcHfZLhCgPhvsbfhWWFQBKkD5+5sL52fD9GaYeuUE6CkaTIM 5BB+q5LSl+2hrePUyLHsEFaFSti6ipoAQZc8ET6rwtRccR66LKra+6rI/Az22N7VY6FE 3uM7cPwpSmO+tlDYf3ZwGeoYcro86efYNGNaCcxtlvA9keFnRFSiHnboWpBIE+srPVX2 WsTdhJwYac2PTPDgf3Gk44UhNfJyLiZ3U66dZQ0vk4NUrbOvZikW5PtbuKc73cEfT5Tj grtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=dultl1pjm4JCG9EixPgbn2xmCjVIcF6QnJUiICb6Dd8=; b=XHZO60hUyXX0x+WUouMCinSDATzoJm6aKr3+gSuDNa/+rnS4kuKr8vs47f0wd6zj39 jN/xvy+Z1Gzyc4aLQjseu9XYSFA7x4WELQ/5oHAuBs350VUpFb57MBte6P2eYStoL9u6 OYmqAGtqyLMsJ8b7r8hDpDnomBBIo/JFxDx5hYmyA9i7ytaktWW2a0X5MJ+KEZa8Mbgk ifd9lVMXqyY3lxP7+wwS9JXwZpJ6ZJK+siJoh+Gg3hPkkwZryfSu0pCy1+YIgqmC2Saj kaXHgtqLvEITsGe1GsJHSzyfjUatWlUc9a5tmYtcUrUvUUmfFQcElXUshwxmeTmXU89F yVlw== X-Gm-Message-State: AOAM532O+MQ8FOVGATEC0a2auvmkdi/R2cnwJ1hixQ4G3I3ZMgKKd7wy u9Aicj4liHqM6wWAOwaybXWE3MoYNSqraEHJznfYtA== X-Google-Smtp-Source: ABdhPJw7/s1PEgyYOvYrKsnOcNUb3asmyEKHsodrQ76EZMRhW8Xx0CUZAbTut5QbJTYWQ+HmNNG3OiWLnRoo/VgutUE= X-Received: by 2002:a05:6e02:803:: with SMTP id u3mr3305539ilm.219.1596625968277; Wed, 05 Aug 2020 04:12:48 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a4f:f650:0:0:0:0:0 with HTTP; Wed, 5 Aug 2020 04:12:47 -0700 (PDT) In-Reply-To: <1534769912.102537.1479915000.00485AFF@webmail.messagingengine.com> References: <20180819122254.mgx2kfbnbsxxtuqk@tarpaulin.shahaf.local2> <1534769912.102537.1479915000.00485AFF@webmail.messagingengine.com> From: Mikael Magnusson Date: Wed, 5 Aug 2020 13:12:47 +0200 Message-ID: Subject: Re: edit-command-line breaks out of vared To: Daniel Shahaf Cc: zsh-users@zsh.org, zsugabubus@national.shitposting.agency Content-Type: text/plain; charset="UTF-8" X-Validation-by: d.s@daniel.shahaf.name X-Seq: 26014 X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Archived-At: Sender: Sympa Owner On 8/20/18, Daniel Shahaf wrote: > Bart Schaefer wrote on Sun, 19 Aug 2018 12:03 -0700: >> > On Sun, Aug 19, 2018 at 2:22 PM, Daniel Shahaf >> > wrote: >> >> >> >> I expected quitting the editor to let me resume the vared session >> >> My first inclination here is to ask why you expected that ... >> >> >> instead it left me with the variable's value as a command line. >> >> ... because the name of the function is edit-command-line, after all. >> > > I assumed edit-command-line would work inside vared, despite the > name, and that when $EDITOR finished it would return me to the > previous context. > >> On Sun, Aug 19, 2018 at 6:18 AM, Mikael Magnusson >> wrote: >> > This works in my version of edit-command-line, >> > >> > + [[ -z $PREBUFFER ]] && { >> >> Hrm, is PREBUFFER really guaranteed to be empty whenever vared is >> running? I suppose so. > > Is there a reason not to commit that? Before we might've thought it was only > an optimisation but now it seems to enable behaviour that isn't possible with > the code in HEAD. I don't see anything in my archives about reasons not to > commit that. I guess I kinda dropped the ball on this, but at least nobody said not to commit it in the past two years so I suppose it should be pretty safe? I've also personally never had any problems (although I pretty much never go to PS2, but it should act the same as before in that case). -- Mikael Magnusson