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 11765 invoked from network); 24 Jan 2022 00:18:30 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 24 Jan 2022 00:18:30 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1642983510; b=F6KlkLFeruEvmRUjBV62DLdb+wsVt1WdSXqbO9h6tEcqsE2Rd9k95ugyJ+jyLy0/QtK7BfiPVO GY+QV5k3+9BUIrpXzS2wMRHrvYu80LBPOEhNBMuYgwgmOkSuW7KRRVC/+sDTY40sDHY9y3T9c6 MFsj7LMLINddv9wGkoJx8IoFht2TsPS1lnryT0WTyawJ5g/SWc2h2aL5owdCqw6yy6lC5dj3l6 tUEGEvt8aWZC3J9jwtNZuofDufSj0m178DH0sAgiDx/M8KEhJNvxAT6CQPbjV8OphiLFg+LhFs lNB3NXnCAyEy2ZRbOc6bU+HLf7VZexzTKhibci7uaRa/Hg==; 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=1642983510; bh=J9MjvLa0vyK3Qf7mmAZTkISp6NxtBl6RUC/jSKIeSzs=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:MIME-Version:Message-ID:Subject:To:From:Date: DKIM-Signature:DKIM-Signature:DKIM-Signature; b=nb0qkxkU6K3ecFOlZGFx3xGWyZgZWXYiKOPZ89cZmimQcvxNasi3m7MMWukE6SBPRGJthSIfZS 83uG4F8nV0E0OZXeixyGnBVQsn39HGk3AAbbW0VzeIDYFlkfRxoDNITxRvpWbv0pMTQL/j1M/Y bMhJkwA4hogdaQhStinKasSrATd3pj4QFvkMa+lj9+hNLpr8LPe2ALsqGp86/gfMXLdnP0316M zoJCSciTfYKEPnvA3yTMfaWYRRX3tuB5S1MADa6NvcyxzIJawcQhByk9+3VVt7OA0k9pQ1gHn/ V7pCeYlgmp2sI9TDfwCyettML3JKRm+Yu1TcVkwLIoEFmA==; 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-Type:MIME-Version:Message-ID: Subject:To:From:Date:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References; bh=QWXXyx761es1yCUetn5JrfVLF8zlA96PnWCptNmhD1g=; b=Oze03CPQi9QXT6nTUwCBezx1tw S6JcRQysLFy4zGOgSenhm1KVQ2Srz2xho3yiMeLQ4yDwlpenQ2a7q2mGMQCIOEwb08REFIasnm7Ss PtZ7HnD+TNvsqeDD9yu/teG1cOU5FM7/PfdI1xAbkis7F9oX6REEg0x9TYCyPVb/nyyFcVm6IuTzq knr3EzjABa1ar6bPOL2S+XPmY9OLwxp6phrjdGUNGBF+VO2ECMxATzqcxCjCE8MycfykJowDFDkZe 6MYrh68eR9Ot00PqdUpzxq7es0Hj3iQdV8QaS+7kRtaL+32aeuDLweWtAVPoZ/7s+KsadziI+5hbl /CpuyEvg==; Received: from authenticated user by zero.zsh.org with local id 1nBn41-00038l-Ip; Mon, 24 Jan 2022 00:18:29 +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]:26826) (DNSSEC AD) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1nBn3C-0002OS-S2; Mon, 24 Jan 2022 00:17:39 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=spodhuis.org; s=d202111; h=OpenPGP:Content-Type:MIME-Version:Message-ID: Subject:To:From:Date:From:Reply-To:Subject:Date:To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:In-Reply-To: References:OpenPGP:Organization:Auto-Submitted; bh=QWXXyx761es1yCUetn5JrfVLF8zlA96PnWCptNmhD1g=; t=1642983458; x=1644193058; b=X4sed+VQDV/pvFyP8t6wrBiio/E7A4NSAse5OalFN+2FbuX2sEwdAjqCI/N9BEyW2EhCviG3Uyd NJ0/a46LJWXMrJ1OyIARHKCzffi/V7vIbC3fZsWxqRzpNPxQZ0fzZUy2c3g62l9SAPRSyA/3hAB8l JmusL+F+Wrni+jDFcn5PUQqrc05Px88BsXbv+NWsHOBQpPUHBrVW0fY6CI2ye3PPeRZkRpB0hhoEe UVlUsgWpL0ZyN/PNx7aVuwHs84+rw0ckObCp6oh7VUqv+XUcVS/a9BWKeUy6TVGyRzHNZGWBX5rQQ 0xyuOVOaPQyiSt+jf8y5HWIMgTTKFAYW4NaQ==; DKIM-Signature: v=1; a=ed25519-sha256; q=dns/txt; c=relaxed/relaxed; d=spodhuis.org; s=d202111e2; h=OpenPGP:Content-Type:MIME-Version:Message-ID: Subject:To:From:Date:From:Reply-To:Subject:Date:To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:In-Reply-To: References:OpenPGP:Organization:Auto-Submitted; bh=QWXXyx761es1yCUetn5JrfVLF8zlA96PnWCptNmhD1g=; t=1642983458; x=1644193058; b=Kyt/KMwk13tdHpopGcs+xlQltAeL0wkbL4kr2+nKK+xMiLj4nsK//xWIHSiXM+CefdtWSTGRVMg LG1jAFnFOBg==; Received: from authenticated user by smtp.spodhuis.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1nBn3C-0002ON-GS; Mon, 24 Jan 2022 00:17:38 +0000 Date: Sun, 23 Jan 2022 19:17:36 -0500 From: Phil Pennock To: zsh-users@zsh.org Subject: Safety guards for typos Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline OpenPGP: url=https://www.security.spodhuis.org/PGP/keys/keys-2013rsa-2020cv25519.asc X-Seq: 27486 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: So I just had a rather bad time when I didn't type a dot. Instead of: mv *(.) old-2022-01-23/ I typed: mv *() old-2021-01-24/ This created a function `mv` and a function for each entry in the current directory. I should not have had a directory named `cd`, that was a bad call. My Downloads area is full of cruft. Is there anything that I can turn on, in parsing, so that *() is interpreted as a syntax error instead of doing the globbing first and then defining many functions? -Phil