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 20166 invoked from network); 5 Dec 2023 02:12:37 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 5 Dec 2023 02:12:37 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1701742357; b=VRclU3GlCqkrIwOYUPC0jWqQPzT/be9t+spWC7tNZc1JJHDrzAtiiU/Rbc0dHTBlRFMtsrwZeP AWNX+E4nv1j6cjdHOkSAyBUWQffjPtaGBOfJUpFfmxNrouH50Df7dUkpf6Qa95s/bR+KHKQaNv +enxjgr/5xoiE0/08c5hZzBTMNSCGKsC5ZWeG/UKwDObeK0Aqk2M/nEAyv+e/CFfF2lDRcZzEA j7VCc4NUmhXyL2vCfBhQJZwMJ2DAUpv3PFwVti3DL68WrpvIUM3lyLMXljAoKBYULnMd69fcVl UH0Zvk5rFsRkapzpMx4v7YLIqpOhsSNDgDZFzfsDkkxLzQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (joooj.vinc17.net) smtp.remote-ip=155.133.131.76; dmarc=none header.from=vinc17.net; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1701742357; bh=i3FusW3iNz8ooiHybmvdoUHDD9sv0yiVKTAkOVL1t6Q=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:MIME-Version: Message-ID:Subject:To:From:Date:DKIM-Signature; b=HemGGp1k5HNnb2vk1iz918q594swajD0pP8VgNFdOmOjlkThoPczuD4tV4ZNpS6By7sg1KQnH8 TdvwAWWDijXSSQIamZKvnDZFjyHW/pkh8z4sX/ub4J7/e0M761RHITJjC3Deuo3OU8voN2e2XB kBJQ4el8nullYaxpkc/y7RKl36MfMcNPYDTFHzTIU5GCXxgZsF92BtpWDt3TMuk0GeiInKRoBg D8QaZ129UevoUZHB61Q3gz6WJUEixzPUx7/HkYyQuL+DjlIvu3C4AOkP+80z/890VK46spCf3C AxY3bbO0VvvLXcjq3odLd9KI3Hvn/IUDaEKgQo+Mw0bgdw==; 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:MIME-Version:Message-ID:Subject:To:From:Date:Reply-To:Cc: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References; bh=WxhB/bsFSh8mJ5tLoD5X/HwlO3iHPbo3v2fTiGsq8k0=; b=asdVvQ9IQ7/RTgPp5Qb0A4bewj oFiVo/KBa6DC6YmfjBg3V40Jwj90hdvaHNJUM8WS7n7CKbUIQS+iub341uJD8Aghp5zBFq8XoTuDN o32x3uZzQF0J15HKrPMzqAtBxjlUyLHfFrVt0DtiExryYj/6/4TGGCBpqZzygU5h43Mfi+KJ4pb9v TxqyRqh19Gn3rFUgczyiE4AxAeUwxqcmDwlSiInrfnBtIiexHaRhwT5HQxXSFM3WU3ZJTW9zGgzkt ySPPoNJ6OWN4p+Vvgta+30+sGAYqOC/c4ZS8kcbU2/lZ4gAUKY8SZ5ehXnrAwjpEm4YRQZJvTALEg uusXJWqw==; Received: by zero.zsh.org with local id 1rAKvM-000EmR-So; Tue, 05 Dec 2023 02:12:37 +0000 Authentication-Results: zsh.org; iprev=pass (joooj.vinc17.net) smtp.remote-ip=155.133.131.76; dmarc=none header.from=vinc17.net; arc=none Received: from joooj.vinc17.net ([155.133.131.76]:48484) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1rAKv4-000ETo-Oa; Tue, 05 Dec 2023 02:12:21 +0000 Received: from smtp-zira.vinc17.net (135.197.67.86.rev.sfr.net [86.67.197.135]) by joooj.vinc17.net (Postfix) with ESMTPSA id EEB44371; Tue, 5 Dec 2023 03:12:17 +0100 (CET) Received: by zira.vinc17.org (Postfix, from userid 1000) id C506B280037B; Tue, 5 Dec 2023 03:12:17 +0100 (CET) Date: Tue, 5 Dec 2023 03:12:17 +0100 From: Vincent Lefevre To: zsh-workers@zsh.org Subject: [BUG] With CORRECT_ALL, an interrupted correct puts a truncated entry in history Message-ID: <20231205021217.GA357346@zira.vinc17.org> Mail-Followup-To: zsh-workers@zsh.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Mailer-Info: https://www.vinc17.net/mutt/ User-Agent: Mutt/2.2.12+67 (757ca3b3) vl-149028 (2023-09-09) X-Seq: 52375 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: Hi, I was wondering why I got truncated entries in the history over the past years... Consider the following with zsh 5.9: $ zsh -f zira% touch file zira% setopt CORRECT_ALL zira% echo fil && true zsh: correct 'fil' to 'file' [nyae]? Here, type Ctrl-C to interrupt. zira% history 1 touch file 2 setopt CORRECT_ALL 3 echo fil "echo fil" shouldn't have been put in the history. Even when I just type "echo fil" instead of "echo fil && true", this is incorrect. But with data after the word to correct, this is even worse, as one gets an unexpected entry in the history. When I type 'a' instead of Ctrl-C, the full command line is put in the history. This is better, but I'm wondering whether this behavior is correct. The man page just says (see SPROMPT): a (`abort') Discard the entire command line without running it. Nothing about the history. I think that the history shouldn't be changed. But in this case, a new action (e.g. 'h' for "history") to discard the entire command line and put it in the history could be useful in some occasions. BTW, the behavior in case of several spelling corrections should be documented. -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)