From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 Received: from zero.zsh.org (zero.zsh.org [IPv6:2a02:898:31:0:48:4558:7a:7368]) by inbox.vuxu.org (Postfix) with ESMTP id C076C23D27 for ; Wed, 13 Mar 2024 17:17:53 +0100 (CET) ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1710346673; b=ilXjWd4Yn56eu7ycTo8gHEhO0VlZcE2xGUJlRIiogHwq3yibB3CxHbsHO/FxfcL3uEPV3JSahY UXB0bmWI72Y9oDNZrH3TwQbsGq8M44A7Yobmscw7oe6QqIc5feVMwMOp8uZVOGccYULSYsyo77 i9mcmDFtAzSHdzMZ7tlsUF298MxfOI1GSoiCaQ5kvEoZOXZxzRddI88nebhiOtil/NrGci5pP8 iZOxPkMLDyDjH+Fw8x5VO0biwp5QPscuDeDI//3ey69J7UzDa3HoPqA96jyRdM15v6JhN0RxaD TP5hskN79WS7wdnXfmTTwvlLxNA/2+Xqtt7Q3XqaH+7+QA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (cventin.lip.ens-lyon.fr) smtp.remote-ip=140.77.13.17; 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=1710346673; bh=M64CPNvV9c6y3GKq1tz4fhq2TrqxIwhLQI+n7I9P9zs=; 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=p5B5VUxCt/U6A6ki7GT0ApOODK03R2WkhrRoHsRebcFp9SeTVviajUZMfHP9qZDLZUAEgI3ZZF I5qQCjeNP0HnMtc8RJenYfUiQQFQuD/iiokKrE83t5dZ02mgpTwyp8KfMQQT6Vz5luYKB+Fucz QIarzWd3RgFSeP74CE536RTmMi1OXEe7IYWpuDbmnMrI5Z7Dcc39XS6IHanZSQwSbbth5w4oKG ua52b3G3kNWtbwTM7IEPOFVHIBjMqqFOcmYmg6wa/xUA0L4K/OiDV39Fiq//mvnCj7hkTUd4n/ BRlEQSO+RIRv5S03SrxsrHvTyPMmBBe8vBNv3Jd42bTwOQ==; 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=AJi2nHv/c11BoQbGg/U+ExdSTrYUWB9uJfbtuITmT4M=; b=eZAEW10d+06oU2lGNzB8WCtS0f hEnyurDenWCUIaSpytLfoOmSGYaDZM6xXj0i/iVOu62+W2WkM6X1afDJVJaXDZUy5tqpnAgxS7vIV G9Geqi4/pVBKsbWYfeMWkjQhHc2u7Xq4FlAfRmJsP5o52xsMzxwo638B1xABoN9SAzTeLPgHGDTTS 5LdaHhbNVapGViBmawP1Vuj0qAlDuTa8BVVrWVz4u79cw8OVeJB6TVGzrDVVH+b04jgEJeuORksli b7RNzRSZTS2MoKFrsdJrxhlkx361yYFfag6TFwHWvBoQp6EJs9CapvzLjqJtQRp0THNJPm3YVFhJ7 mBNGH8KA==; Received: by zero.zsh.org with local id 1rkRIc-0005zB-Ut; Wed, 13 Mar 2024 16:17:50 +0000 Authentication-Results: zsh.org; iprev=pass (cventin.lip.ens-lyon.fr) smtp.remote-ip=140.77.13.17; dmarc=none header.from=vinc17.net; arc=none Received: from cventin.lip.ens-lyon.fr ([140.77.13.17]:43796) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1rkRIL-0005hX-8U; Wed, 13 Mar 2024 16:17:33 +0000 Received: from vlefevre by cventin.lip.ens-lyon.fr with local (Exim 4.97) (envelope-from ) id 1rkRIK-0000000EkU0-3jVB; Wed, 13 Mar 2024 17:17:32 +0100 Date: Wed, 13 Mar 2024 17:17:32 +0100 From: Vincent Lefevre To: zsh-workers@zsh.org Subject: nocorrect documentation and behavior Message-ID: <20240313161732.GA3513530@cventin.lip.ens-lyon.fr> 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+69 (354c5b11) vl-149028 (2023-12-10) X-Seq: 52749 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: With zsh 5.9, consider: cventin% setopt CORRECT_ALL cventin% zsha && zshb && nocorrect zshc && zshd zsh: correct 'zsha' to 'zsh' [nyae]? n zsh: correct 'zshb' to 'zsh' [nyae]? n zsh: command not found: zsha while without "nocorrect", the 4 commands are proposed for correction. The following lines are handled in the same way: zsha ; zshb ; nocorrect zshc ; zshd zsha ; zshb ; echo $(nocorrect zshc) ; zshd "nocorrect" is documented under "PRECOMMAND MODIFIERS". So it is surprising that it can affect more than the corresponding command. Is this the expected behavior? Well, at least this is useful to be able to use "nocorrect" on the "for" words: nocorrect : ; for i in word1 word2 ; do echo $i ; done Given the context "PRECOMMAND MODIFIERS", the documentation is not explicit: nocorrect Spelling correction is not done on any of the words. This must appear before any other precommand modifier, as it is interpreted immediately, before any parsing is done. It has no effect in non-interactive shells. If this is the expected behavior, I suppose that the documentation should be something like Spelling correction is not done on any of the subsequent words of the full command line. [...] -- Vincent Lefèvre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)