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.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 25306 invoked from network); 24 Jan 2022 02:12:17 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 24 Jan 2022 02:12:17 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1642990337; b=sGBfsjI/BRt2qG2NA2j55mUokxUM1p4HlIxxK4C2BZ5+zrs97FMsY43RFvvq/houKf6bdrQSWc eJ3AxQHYTAqt/1mgMHiKH4jmifsEk6w1k+ZTWbSIXp3wIp01lL4T5wqyK6F+w6EOHqYiGXyAAx jspP1p91u8nuljvn7at79SkCVOOdHPHUbZOdNI07mHFYyuXfMSCeCuqflbHKo3+QINDYKIESxk 1/YlN40fw4TJQdvU3nLd8U90FcOaoL9bmePvGf7TJe/w7OT2BCcrElf/SrS+Occq1tcP3kNGtG fw7NcKer4E3EMiigbcEGWkEpwpllMmANImgMxUHFBII/ag==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mx.spodhuis.org) smtp.remote-ip=94.142.241.89; dkim=pass header.d=spodhuis.org header.s=d202111e2 header.a=ed25519-sha256; dkim=pass header.d=spodhuis.org header.s=d202111 header.a=rsa-sha256; dmarc=pass header.from=spodhuis.org; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1642990337; bh=CNAyLZCEKxoect1a/ruD1PDn8D6uoea4E4Ue2wF3nVo=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:DKIM-Signature:DKIM-Signature:DKIM-Signature; b=k0WICQHkX3tlCgKWxK3d37ArBaE4EMNAc6K+ofjmjcWY963yj1F2KyQfBqunGm58o1phOcuKl4 lwwsloWN1MejOdNtM4dhFvLq5Zenr5ww+14zqcHfQ0PN+wbP8I8CRnch2RTL3ZSagaobIpyJd4 kra0D9FBRvhsgQr6CiUP5XlbRlArnJSjPWMTCbUHuDZQZTCjJPdTJkDZ7dGHKNZSnhfWnL7pwp m2N8zuaMTvi8pjiQvNPbKQ4CG6r38DkzZE+WquGyWC6hrkIIHmsA6E7x69Y1LYCOdhGFM37urN D8i+87Xn28YAfczAKUArBrAO1J2C3FPgjTtv7ug1Ha+vfg==; 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:In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=t7Eu9wc4FREEi4PWAknenBBYXzezZ5y3uY4aN+IH3d8=; b=CglctbrWVvlUH7iRRwRpYnChRA 4IR+Zw++aN1O1uoRK6FUJiyb9fNmVA9PqwzIXUKd9FSDF9j9W6E4gW0fHvplXOZn/sGTn4iqgSpT8 elL5kxpO4kGhumn/U75FmMqmur+PhRmjXHvfI8iodolD2G9pmJfNTLTs/mW1m8J+z0tZlbL/1kY99 +92PRlbZt9sP7qwA5ZPujxrnnXeL6UzU30QEsimo9JplwacR5Dqng82Z0iVErKzGU5AQgRpJFZhNJ NQ4QzOLXD2mapwg68PNoO/YjZ97qnWnACZH9EnAadZrGSWx3UBkhRhelDM1xQsyv33cl60Db96TPw 9BnUgP2A==; Received: from authenticated user by zero.zsh.org with local id 1nBoq9-0009UA-CN; Mon, 24 Jan 2022 02:12:17 +0000 Authentication-Results: zsh.org; iprev=pass (mx.spodhuis.org) smtp.remote-ip=94.142.241.89; dkim=pass header.d=spodhuis.org header.s=d202111e2 header.a=ed25519-sha256; dkim=pass header.d=spodhuis.org header.s=d202111 header.a=rsa-sha256; dmarc=pass header.from=spodhuis.org; arc=none Received: from mx.spodhuis.org ([94.142.241.89]:65471) (DNSSEC AD) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1nBopZ-0008mA-3a; Mon, 24 Jan 2022 02:11:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=spodhuis.org; s=d202111; h=OpenPGP:In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Reply-To:Subject:Date:To: Cc:Content-Transfer-Encoding:Content-ID:Content-Description:OpenPGP: Organization:Auto-Submitted; bh=t7Eu9wc4FREEi4PWAknenBBYXzezZ5y3uY4aN+IH3d8=; t=1642990301; x=1644199901; b=BSkj4f9fohRqrOerKU66ebMV71TbQpP2OgTJJy8slBPGoWB 8qAlTCvbvZ9sKgwXSEEO4UCWrFy/Xs8Y0k35wM2ntMH8FCsk5uTQvKkJe6JB645BZZCqLBJSGEtAJ X9W0B4oAg9XKfN2rhnj1BgFWyd9Bw5YL2R7ZFW2gvPSCQ8E1SgFsGdFczTb9+ck6jCqLvBWr75qJM jtNulJ35ybYkTOFaFv0ZJwx2VVtrzpbo/Bds4FhObJiKOdYQEa2V1eZYN3iXMw/HHodx1j8zp7R13 B9XcMephECY3Khd4MIZlNxP52IoIwrDVD/myCtrCAI7TttJDsQC97rf4APV0cCAA==; DKIM-Signature: v=1; a=ed25519-sha256; q=dns/txt; c=relaxed/relaxed; d=spodhuis.org; s=d202111e2; h=OpenPGP:In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Reply-To:Subject:Date:To: Cc:Content-Transfer-Encoding:Content-ID:Content-Description:OpenPGP: Organization:Auto-Submitted; bh=t7Eu9wc4FREEi4PWAknenBBYXzezZ5y3uY4aN+IH3d8=; t=1642990301; x=1644199901; b=J7lGei5zKRhYoNL0G0EBrEkscMQTErgozDlbCg50RjDJ+Im RpQ6REVdcDb8Rjsa3k2MqcwDzOWcaKH99tF4gCQ==; Received: from authenticated user by smtp.spodhuis.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1nBopY-0008m4-M8; Mon, 24 Jan 2022 02:11:40 +0000 Date: Sun, 23 Jan 2022 21:11:38 -0500 From: Phil Pennock To: Mikael Magnusson Cc: zsh-users@zsh.org Subject: Re: Safety guards for typos Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: OpenPGP: url=https://www.security.spodhuis.org/PGP/keys/keys-2013rsa-2020cv25519.asc X-Seq: 27489 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: On 2022-01-24 at 02:46 +0100, Mikael Magnusson wrote: > setopt NO_MULTI_FUNC_DEF would probably do the trick in this case, > though it will also prevent explicitly saying mv cp ln() { whatever }. I tried it and the protection doesn't appear to fire. Is it possible that the examination of multiple words before the function definition happens prior to globbing expansion? % echo $ZSH_VERSION 5.8 % echo ${options[multifuncdef]} off % *() { echo wibble } % whence -vfa zshenv zshrc zshenv () { echo wibble } zshrc () { echo wibble } % -Phil