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.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 6639 invoked from network); 5 Dec 2023 21:22:36 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 5 Dec 2023 21:22:36 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1701811356; b=KorEPa2rvGUM00qsEBXQcBFca2FZ1aqQDKNy4OtMXH4qWpQNd+mF/qbEBZt35L8HVvEPJby3No Nl9kjI+Qg6XzgDA8VccpMcQP5+j1XlGIWZUA4DArJQe3kjFG9Q8ip1E8VWPjM9xgodOdjJcHrm gdpXbCxXT16Pf89R6jAMCZooWhOPMQfMH59vaNw0FXeaIbgs+wr2FMjKJZcDj7PPsVHKgKmIL+ OaqXD9hzO+GTE0jdoStxD+dINyZZlAbMX0RuDkCaOQugBbJWtAo5sGLU980deouK7U1S1d1Jl+ UfVfbkHZuqhyU5Ag21XkdcPDNTD/QYDnIbRZWM9ggCXH/w==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ej1-f52.google.com) smtp.remote-ip=209.85.218.52; dkim=pass header.d=brasslantern-com.20230601.gappssmtp.com header.s=20230601 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1701811356; bh=poikPo9gt4xlaombt6p8wjYn8O8sXGrrrZ7RiRh56PU=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:To:Subject:Message-ID: Date:From:In-Reply-To:References:MIME-Version:DKIM-Signature:DKIM-Signature; b=L+bPRrXNeits/7Ns7mkbeXVgwyWKiJnbY7gHwu6kQl2k3rf9Owj2Z5wskeTjVUlcDg/mdtmI8r 6+k+7nfXDoUsjXCNtu1lY4P19T7A6NKuvUVt2Uih8yYC8Pc8unJ4tnenIrGCbJKsX2pH9epkz1 0mzmAkU8jvsAbXXVxzHPYb2NdFYm8tJxoXdA8gVQz3ARfHDIq0L+qqC4UvolW2yW72WbmVsK5N HkYNJg19szROwsGvgog8vcLLXmhvYAHhKGWV8LnM7/rXgaS5nSZPL92rT0h2Lw1MYsrLZomlL1 PAF7EoNHBHbOb40FY8qusbulbG+9I5A2RVbXp69y5q4asA==; 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-Transfer-Encoding: Content-Type:To:Subject:Message-ID:Date:From:In-Reply-To:References: MIME-Version:Reply-To:Cc:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=i430CII+QTRDwok5XoKdgd0drF/YW8Q7eazONjePhAI=; b=hbrEpWlMPFLr1uOdCkE/od2elz MPEIzDzsXFLMkpep9jFTZOKX6kMe/5CatQXJ00sQ5RAA97qCLuXC4oNFX+49sQ4l/dHSOnnnChxsB ICBCTbqRThGuP8jTLfh7khFJd9PnrRBglfSnhvAZKERVuPkXrJY5lViyMDXN2daCSpFxOS6IsEHi3 70h46z6kk24cqguYwxrNSbxD7vRQQTtC3rsJ12FWNI8Co5z1Co9VZfDF9TxtJNjY7wmnlG7hr7h0k qMCFzPNfZsoVbAoSoALhkUr/QzPtV7GfdS1IqwiwPoct2YeFfJ3MtaGFBMZISHRcP2Fj5sqiq1kf7 cG+eeIBg==; Received: by zero.zsh.org with local id 1rAcsF-000KUD-0Q; Tue, 05 Dec 2023 21:22:35 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ej1-f52.google.com) smtp.remote-ip=209.85.218.52; dkim=pass header.d=brasslantern-com.20230601.gappssmtp.com header.s=20230601 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-ej1-f52.google.com ([209.85.218.52]:45404) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1rAcrz-000KDL-M5; Tue, 05 Dec 2023 21:22:20 +0000 Received: by mail-ej1-f52.google.com with SMTP id a640c23a62f3a-a1b6d183fb8so12407366b.3 for ; Tue, 05 Dec 2023 13:22:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20230601.gappssmtp.com; s=20230601; t=1701811339; x=1702416139; darn=zsh.org; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=i430CII+QTRDwok5XoKdgd0drF/YW8Q7eazONjePhAI=; b=CZzJ2Ex9NoxswpoWA9KzS1pvsgawy0FtD4tT5eWIgUQmt84ORYusSYs35v5dLdF3L8 qIUAwW4cPYNpEAUfj2W0zqCT6q6BjHVzNlcPhRn4ZT6ziLDLOdeNw6rXeunmgYW3k/lX u8+bi/9W0td3AYwnDoN/jvowykhwpbAehNgRL6mlE0pXdLVt5gNNMjAJ8R4RgS65yIjw 0hcRZjIRk9XS3EGiNzyaqLT7THWYJF6JGZbLOzwzPXwv2ZkHOYQmJIADzYHH+iyI4p6U PUpM/VVlMsvmFhFbrZhp71qecfW3wcyXL5p8jfa+Ad9Cws0jFj1Ht8HVQDOkDv2jjKIv jKzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701811339; x=1702416139; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=i430CII+QTRDwok5XoKdgd0drF/YW8Q7eazONjePhAI=; b=vfFA6c17gDB81j8NPyuilY9d+uM+WVK3mZKYUpL6yC9zjCURbjVbROO+vtHbAl6VSp 7IsScxdvpNwJCJxWg7uvdb6wYmIXv/5bAh6du3/5J4X8HBRnWROWMc2GF1z2i8gcv7hL tsiV7lyHgTekYlt5GAGo3ar79XN9YDkg8uAZhrQoCCGSjPtdbKODy0wYVxgciI2bx/fk gOGlGNSZb7bkmslJ+a41kK6QwNzRJxkeS4WfDzrjExEKI9koKYzHcDrPoos/UghnF1bR AHqGmAc3U54GetHMgLrwaM2obNgQBxlC0n8JNxDRU91OFhTxv/+yzKOtHJs6OnCaicu1 SV4g== X-Gm-Message-State: AOJu0Ywi1aSqbQ4mVQE1NC/togBmj53zmDOVcNDnJ9kLckBli7DQHq/Q 7KamlfmWUtE479aCTWNVHN/oACOyX9fbaTJAAuvwt3vjUIaBbVIU2Ug= X-Google-Smtp-Source: AGHT+IEsW0WXZ9IwozaUZ3btt9fByEJ8608HUBnHTMUILjbEoU54bypDOhMoM5fRx/ph0HYzX/Kk2VfTlkzEOSI8Y+g= X-Received: by 2002:a17:907:61a7:b0:a18:896c:9dd with SMTP id mt39-20020a17090761a700b00a18896c09ddmr722960ejc.41.1701811338857; Tue, 05 Dec 2023 13:22:18 -0800 (PST) MIME-Version: 1.0 References: <20231205021217.GA357346@zira.vinc17.org> <20231205125732.GA1126552@cventin.lip.ens-lyon.fr> In-Reply-To: <20231205125732.GA1126552@cventin.lip.ens-lyon.fr> From: Bart Schaefer Date: Tue, 5 Dec 2023 13:22:07 -0800 Message-ID: Subject: Re: [BUG] With CORRECT_ALL, an interrupted correct puts a truncated entry in history To: zsh-workers@zsh.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Seq: 52380 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: On Tue, Dec 5, 2023 at 4:57=E2=80=AFAM Vincent Lefevre = wrote: > > I thought that this would have been put in a temporary buffer, > until the (possibly corrected) command is validated. I'm not sure what you think "validated" means here. > I think that ^C and 'a' should just skip the history. I'm not going to make a decision on that without further feedback. I know that when I use 'a' at the "correct" prompt, I often do eventually want to go back and re-execute the command even if I wasn't ready to 'e'dit it at the moment of the correction. I did notice something that seems more like a bug: If you 'a'bort a correction at the PS2 prompt, you're returned to PS2, but then never prompted for further corrections at subsequent PS2 prompts. Meanwhile 'e'dit at PS2 does not leave the PS2 prompt but then pops the whole complex command back into the editor after you finally reach the end of it. Another side-effect of handling it all during the parse. > In particular, the current 'n' one is very ambiguous, because one may > want to run the command without any additional prompt for corrections. > So perhaps there should be a real > > r (`run`) Why would you want "discard all and run" but not "accept all and run"? Anyway I think that's more typically handled by distinguishing 'n' /'N' and 'y'/'Y', although (see above) 'a' already discards all.