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 4398 invoked from network); 18 Dec 2023 18:36:40 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 18 Dec 2023 18:36:40 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1702924601; b=WkSTM36aYGk2ZX2Y/uwdIUnN1XMdKM7STXXFcccUByrAzcUkX7DR7MdxNWPJs0vq9FTL61xY7g o3WVcn/dnHdwt5gOesCbSOhqREQQUIJqfEde2zKcfm5fpU98FmJcxRnAmguC7YNGCMXHZT9wtB 2lgSMxjPh6tGQqD/gC8Ncatk01EHYJM/7ZB7AWIKNEMW8U1pR6W5tEJ4UsoGBTCY+R8OhyKJc/ 0A1wRvQWNsPJLK6EjjGeBCc+SSJKwjHSrg+4vbxUQ1kmZwt5+HoHpgSOnNyBpHiqEGGldrokdJ byk2HwmlNsL01YgVEISfLhFat+Nxsr+hMCLE6oVN0bE8VQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ej1-f48.google.com) smtp.remote-ip=209.85.218.48; 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=1702924601; bh=BbouOOVNa9pgR95xtuBQWkQULPx35CrFJkwKnr35d2A=; 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=QddGmqe/mX7ti6a81/Y2XCMvaVXM3eGaP2ALYxm4dJGivs8xnEo0aQjvO9AXknpbvi+iVC4pUD v7sJJxQOgmsphQ2qPjFNDlmfbYo363/DT1HY/UMrRTr4PCApy7BylBhSBNl5BWTpWTrsu1NLHR mGVw6v028t5MN1KYSZmYdAascEFTsMQYUljsf357uWtDELY1BVP573IME9ZdRzS7dBv/k0+qcy 0zgMwFjd1m2N6Wbxp/qQ9wbEx4q6CgS68qSiBcyokiqKzLcTg4CcZKtc8HPOmVVjPw2cYL+OMf PBCPGBXcCiI9jy9JO1puS4oqKvJt90FKfLTFwVr9k3I4dQ==; 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=7rkKDwN1WaDU0+Crl95YzYU/GCbuggQQZSHBcgCF38g=; b=PdYSwX+2sQqWTuTMRNxvg98Onl B0RstebVoLMW9DuKlFYJrtgDvBt+cPqDHxesx4PeHXQ4SEMo0kI5ZP/rE9NRi0nQH4FVFLYpHPRDX /lGV2rS26a+xxxMcYXiAYdRBYxD4P/44i1yZKCBnHyitdN08I8MlYrn+KGmoYDbtAYnbeeC/6tNik vUpnQoNOIdqU+1PYmqnon3GWEwE80ScGxgRlkyUK9k6LNZBenui5KGT5iMptUWJabs06sAxK6pto4 R4dyvyyqgWxOkpa+CRZlmW5/0qC+Ddw3rgg5F3A8uXyE+tyJo3JS8O6yfQTChpJrxm5rQn/ZYO9UH ASliT5aw==; Received: by zero.zsh.org with local id 1rF7F1-000Dus-Hr; Mon, 18 Dec 2023 06:36:39 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ej1-f48.google.com) smtp.remote-ip=209.85.218.48; 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-f48.google.com ([209.85.218.48]:50679) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1rF7El-000DcO-QD; Mon, 18 Dec 2023 06:36:25 +0000 Received: by mail-ej1-f48.google.com with SMTP id a640c23a62f3a-a235e394758so33060366b.1 for ; Sun, 17 Dec 2023 22:36:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20230601.gappssmtp.com; s=20230601; t=1702881383; x=1703486183; 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=7rkKDwN1WaDU0+Crl95YzYU/GCbuggQQZSHBcgCF38g=; b=K4Wf8To0o1EXC0ZSfcNdMorCDvTwzNWBtp7+ccgO7SafZHErcnaPEiEIp2kiV/xSJb pr4OeD5PqjHR/nZl+ckx1oqRs3G0Ski9LzuoemZf5m1x+i08FKeJIv5Ix1IKd7dAuM0z VR5l5hQMlxmULVd5sYXqicAudnpcy06ThGyhROxFem5fGSpNXqhx/nu7oybFVaAxSPw8 xjne/lc5UmOZOl5QuNY7afWR2/i1jk+jswr4B1t1HfxGxZyceB13DNgKsVpHLlsowznC 3LfEZVNhQ4uHlddtZ+dI1ehTb8H3v8zZWHc/UQWrhg6QIu/qxkFZ7bKmNWet6VJZVs/6 s2JA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702881383; x=1703486183; 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=7rkKDwN1WaDU0+Crl95YzYU/GCbuggQQZSHBcgCF38g=; b=eyv38+i40M01+Ou3ZkHq4TGRFaf2heu8AZrDZ1DVQkOccEw/ywFT8AJ4jyqSyxvc27 RAeTbHdtvyYbqVOzcYVCGESSW4y4tf0sgQvd3v10doZHuNmc+oMxr0wO+eEny++zlWou 6+j/R7hfwyOOyOk1qj7Xj104SATez5U+1Ik3jlQla508SvnwdYlMVGON/pZlVXpZ1ARx gGRUvhisBBBTFIVQ1fzTb46Hu12ZnLjpn7sL45w7tIUlzG6iJHjISkIFh0GuwIHz9F2I R4KUJQHASXiphyt3zs1hopNRqJiFySq3ZzvuQ7o8XiHMf1vS2nD42atQKyDa0gUuZP5b TbfA== X-Gm-Message-State: AOJu0YxewAKg33T2sX9IOyk9URptzqPuA5uPqbhsNfJkgpTaayNHr9VK R5GfAIqZKOXXNleWjRX+rYKYoqMElkj0+9MuwenrlC+dfY/Sto/F X-Google-Smtp-Source: AGHT+IHv+Y+ScZT9Q85fn9jdsYaaxSnpdT8lGPEBPEQWUyMaPTkrssBg9GVY9ppMQmk3aYOEQHMeKEGHhVEt1OyVDCw= X-Received: by 2002:a17:906:5195:b0:a23:64a5:fb82 with SMTP id y21-20020a170906519500b00a2364a5fb82mr57808ejk.134.1702881382824; Sun, 17 Dec 2023 22:36:22 -0800 (PST) MIME-Version: 1.0 References: <20231205021217.GA357346@zira.vinc17.org> <20231205125732.GA1126552@cventin.lip.ens-lyon.fr> <20231206150333.GA385094@zira.vinc17.org> <20231217135407.GA3237@zira.vinc17.org> <20231218033752.GB3237@zira.vinc17.org> In-Reply-To: <20231218033752.GB3237@zira.vinc17.org> From: Bart Schaefer Date: Sun, 17 Dec 2023 22:36:11 -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: 52420 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 Sun, Dec 17, 2023 at 7:37=E2=80=AFPM Vincent Lefevre wrote: > > There could have been a special history file for aborts. Time-travel is not a likely solution ... > Or perhaps > the history file could have some flag for commands that are in the > history but have never been run. That would get rather messy given the existence of shared history and of "print -s". > Note that in many cases when I want to abort is when the command > already comes from the history. So there's no point saving it again > in general. The widget version from my previous message saves only the $PREBUFFER on abort. If you've recalled a multi-line construct from history, PREBUFFER will be empty. Presently ^C ends up acting like 'e' because I haven't gotten around to signal handling yet. > What I intended to mean was just a widget that puts a command in the > history without running it. hist-no-exec() { print -s "$BUFFER" zle send-break } zle -N hist-no-exec Unfortunately this doesn't prevent $PREBUFFER from being saved as its own e= ntry. > > That said ... attached is an actual ZLE implementation of correctall. > > I would be much more interested in a "correctnone" I gathered that before, which is why the correct-all-words widget adds the '!' response. The other typical way to get this is to use the "nocorrect" precommand modi= fier.