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 14585 invoked from network); 30 Dec 2023 17:43:41 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 30 Dec 2023 17:43:41 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1703958221; b=PpcrEX9Eq8PyzoTtLUYZriXNm8SHCwxoPnZ9j3BwjJY9G4m4fmFm7urma5QIG9Zqkw8bDqaOOO aReSRc1EQ98nUllBwgVr/8yp5r7gQtUCmuVVSZq6fIWpkGt5tKGCv8xlupyQ58hLS98DKGuIpN z3zO2uVKc0ntAiZKiUWJ+mUJP+Vd3Zu0j8kuiXwurMlv3S2fVZUHCsiUYMT1Os4udL5fYG5zoy XRHH176qnKMP/Na91QO3C/nTnEWxnjF5rMp5EyG+pfILOJW4Uo138/JoBnre3AafAtrOVai+zN 22MnfdzLRU3sNGuXAZIBB35llfZe74voLoHsKDqBLzb8CA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mta02.eastlink.ca) smtp.remote-ip=24.224.136.13; dmarc=none header.from=eastlink.ca; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1703958221; bh=OQwIP490sfwx50fvj9CBxOZA6/0/e5/N5Xbe88C6it4=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:Subject:From:To: MIME-Version:Date:Message-ID:DKIM-Signature; b=sKFgyUPzGnt5CB9HOgwiViOYXSvqbK8y5ZTak8/9RSBEWuONa1hapJN8j0czlRtwCke8KnPhfx 1PuxNR4GEDyvuQzObI01bEfOKheyAjG2P3u+bkQj+WuNIoJwmrOrFWEvynhIbppjw9oponApoH 6SoNgsc5/HMhrMDUFSMWpiQf5Nxydd23pIHO7vz4Y+ORXE3TIlTMjBau4qhBxQDh22qhIRhSb4 +OKbbDWeLCucgDVo2mt72nkOwTMkwcjRqC4k1EZWuM3aCvgw0FT5sYHWpBcNdxDVhjBZ6XWKVm 6KAYlxZY+HPF13PNefW3fGKASxuC9fr3D5it8P2p/kH+AQ==; 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:Subject:From:To:MIME-version:Date:Message-id: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=2xY4L3EJRt0+OoTXl0DX+16GkpEcAQ7G+kSEZGYoSq0=; b=D00x4lIEQ2ulwzKvVj3DLMAxS7 ucUlsVqohAtuippW0Tbq+ArJWRcmVixcKjbfZSHQ+tHUnfPOgEmL6cNxrm5H869HKTkQYL/X79oWG mj/GQ0LyOnw4UJBF/CSnWuWnnz2KqhMHfDjrYBjAJqm9wvAvJXhCXItix+6aXyEU36VkBguKeN7WM ty+kWBY7AMBCicsTYnILpv1by17cLDABPSDgQFh/ls4FzyI5nionXycx/uuz/PY4E2brXVuBYCW8F P71RkE1FgWFeHB7MPWsUtvYu2upvigtu53wuFBhQMqf0mMl+YuhWkZXkFwiNxU+GWb+g5yspfVRPq UmlzjeJA==; Received: by zero.zsh.org with local id 1rJdN5-00001q-Ka; Sat, 30 Dec 2023 17:43:39 +0000 Authentication-Results: zsh.org; iprev=pass (mta02.eastlink.ca) smtp.remote-ip=24.224.136.13; dmarc=none header.from=eastlink.ca; arc=none Received: from mta02.eastlink.ca ([24.224.136.13]:39325) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1rJdME-000PHm-Lh; Sat, 30 Dec 2023 17:42:48 +0000 Received: from csp02.eastlink.ca ([71.7.199.167]) by mta02.eastlink.ca ([24.224.136.13]) with ESMTPS id <0S6H0M8TEQIAQH30@mta02.eastlink.ca> for zsh-users@zsh.org; Sat, 30 Dec 2023 13:42:44 -0400 (AST) Received: from [192.168.0.11] (host-24-207-19-13.public.eastlink.ca [24.207.19.13]) by csp02.eastlink.ca ([71.7.199.167]) with ESMTPSA id JdMBrkqqzW7C8JdMCr2M36 (version=TLSv1_2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256); Sat, 30 Dec 2023 13:42:44 -0400 X-Authority-Analysis: v=2.4 cv=CpB5MF0D c=1 sm=1 tr=0 ts=65905694 a=e7T7DzMKK1R988ZCg0wLyw==:117 a=e7T7DzMKK1R988ZCg0wLyw==:17 a=IkcTkHD0fZMA:10 a=w7JlpVeC4K8_CryG5xsA:9 a=QEXdDO2ut3YA:10 X-Vade-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdefhedguddthecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfgtefuvffnkffpmfdpqfgfvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhepkfffgggfvffhufgtgfesthekredttddvjeenucfhrhhomheptfgrhicutehnughrvgifshcuoehrrgihrghnughrvgifshesvggrshhtlhhinhhkrdgtrgeqnecuggftrfgrthhtvghrnhepveegueehueevueelvdefieekteevfedukedugeeihedvvdfgvdffieekheeggefgnecukfhppedvgedrvddtjedrudelrddufeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvgedrvddtjedrudelrddufedphhgvlhhopegludelvddrudeikedrtddruddungdpmhgrihhlfhhrohhmpehrrgihrghnughrvgifshesvggrshhtlhhinhhkrdgtrgdpnhgspghrtghpthhtohepvddprhgtphhtthhopeerredprhgtphhtthhopeiishhhqdhushgvrhhsseiishhhrdhorhhgpdhgvghtqdgkihhprfgrshhsfigupehtrhhuvg X-Vade-Score: -100 X-Vade-State: 0 X-EL-AUTH: rayandrews@eastlink.ca Message-id: <69024621-9e60-474f-9c32-4edaecc3ff68@eastlink.ca> Date: Sat, 30 Dec 2023 09:42:43 -0800 MIME-version: 1.0 User-Agent: Mozilla Thunderbird Content-language: en-US To: Zsh Users From: Ray Andrews Subject: zmv exits from function Content-type: text/plain; charset=UTF-8; format=flowed Content-transfer-encoding: 8bit X-Seq: 29386 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: I'm using zmv to rename files in a directory tree recursively via a 'for' loop which visits each subdirectory.  It works fine if there are files found to rename, but if not, then the entire function crashes back to CL.  How can I persuade zmv to just let the function cycle to the next subdir?  I see no option that seems relevant. Cut down to the essentials: function global () {     f ,dB >! /tmp/global_tmp    # My function.  Gives list of subdirs, works fine.     curdir=$PWD     for aa in $(cat /tmp/global_tmp); do     # For every line:         cd $aa         zmv '(*).SNT' '$1.eml'         zmv '(*).MES' '$1.eml'         cd $curdir     done } Lots of other test commands in place of zmv cycle fine in case of no match, but zmv insists on returning.