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=-4.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,NICE_REPLY_A,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 15707 invoked from network); 9 Jan 2021 17:29:27 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 9 Jan 2021 17:29:27 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1610213367; b=WVl0qrwbXk7rkZVrjAjxHmDDP/Hcws0xC797h6/XCmZFE724ufZt+ubrSqmZDapgHIsp9q+4Kv DObCdOXn2z7bf7D55FREcWdAV7mDPSIjjz6MC6yIKGPxSGYUdqjgMHkGjPBJcV3sX8Wtm6+TzK gNH0cWYZ1VKnK+/f5hvZsyNjMxcikmye9+edCpfxMxUlPECRUyVVtNOGE9hb6YyTHEUsU3BGn+ qvXamgS4EYXpeTxgHiV4E+S5/DHFxfOh6gLOsBW/JnNsjliCwGbJqInrfmffrtffNEX0+8R/my 9y3osw2UsOTo2R2JePCKGl2lZLk5A5Xd/aB7wAMr2ByjaQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mta01.eastlink.ca) smtp.remote-ip=24.224.136.30; dmarc=none header.from=eastlink.ca; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1610213367; bh=HR4773JFYGKaqpKYzHKeNZ2akne6JfCQ1xpu+mChPNU=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:To:Subject:DKIM-Signature; b=OtMkI0A2mAqA7cHxoXlAbeNcr2HsTaGg0SypZsQMvDFZY2++EqCCKLVJiGhispcdSB7fNYuiyX UB/ZwOH4qBMUKnxUU9VOkEicBGGCkkePgGRdXF/FePQ+k31dbRFUWisarjDP+HL4Zs++RiYLb7 ToXhL5vwPZgQvPn6x7KVXQJ5r8EZgCOSsntxDC+kxX9atckyKDdmo8pIKNxRuuCtDmPotzCLMz 6eP8Td02h68nLlzweIuIEaqkbaLTL1+ll7L9SRnFh3HLv6AO5DkarKe/DMbkTppmGx+rmMqsUm rInqMKtr4aNMXVox4OD151BREyzMTTMic/+mQ7AzPUiSig==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-transfer-encoding: Content-type:In-reply-to:MIME-version:Date:Message-id:From:References:To: Subject:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=N3oiL0uEh8hUssK+mYjGM/4Jw0yIzbcELTnGRIbM+fI=; b=Pjmz/ul9l606tEEBmba7o0sY7v 9do35tACvun/SwTH9WvSd6FkSig+FjPAZw+xU2nyohqamYoMVrNQNQFOP/z8WKtcx8quvq+Axu/KJ +0c03yQqUeULhSvzMLipuX4sSPBoDvRD4264Bb9UVGAbg58Pobe/xZKeWrIR9/zhzJ8zI2Jj1Icx1 gVbwlzNlwVHoCvCUnv0F/+qrYWSJ2iz7SFbtConh+ULowj5nPBo4Z3gDGqO8m4nt3gFubL3aM3I68 kze0H3c7V6v6hdRWKejXXU6rkoCA8F+LBqJRjfiKSysU8BAHMBzJNBYMSWc+jEnfdj11iSskToRsE a/7ep+Eg==; Received: from authenticated user by zero.zsh.org with local id 1kyI3G-000ELR-N5; Sat, 09 Jan 2021 17:29:22 +0000 Authentication-Results: zsh.org; iprev=pass (mta01.eastlink.ca) smtp.remote-ip=24.224.136.30; dmarc=none header.from=eastlink.ca; arc=none Received: from mta01.eastlink.ca ([24.224.136.30]:50246) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES128-GCM-SHA256:128) id 1kyI2o-000DzA-Qf; Sat, 09 Jan 2021 17:28:55 +0000 Received: from csp01.eastlink.ca ([71.7.199.166]) by mta01.eastlink.ca (Oracle Communications Messaging Server 8.0.2.2.20180531 64bit (built May 31 2018)) with ESMTPS id <0QMO00857ELXW3E0@mta01.eastlink.ca> for zsh-users@zsh.org; Sat, 09 Jan 2021 13:28:52 -0400 (AST) Received: from [192.168.0.2] ([24.207.90.194]) by Eastlink with ESMTP id yI2mkIk12BfFDyI2mkBUK5; Sat, 09 Jan 2021 13:28:52 -0400 X-Authority-Analysis: v=2.4 cv=Ncoja0P4 c=1 sm=1 tr=0 ts=5ff9e7d4 a=zv49KfEsxEDzuN5AGO7r0Q==:117 a=zv49KfEsxEDzuN5AGO7r0Q==:17 a=IkcTkHD0fZMA:10 a=ZcH3bysPgsDqVAS4GVEA:9 a=QEXdDO2ut3YA:10 X-Vade-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrvdegjedguddtfecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfgtefuvffnkffpmfdpqfgfvfenuceurghilhhouhhtmecufedttdenucenucfjughrpefuvfhfhffkffgfgggjtgfgsehtjeertddtfeejnecuhfhrohhmpeftrgihucetnhgurhgvfihsuceorhgrhigrnhgurhgvfihssegvrghsthhlihhnkhdrtggrqeenucggtffrrghtthgvrhhnpefgudetgedvgfejfffgueevieelgffhhedvvdetvdduhfeiteelleevgeelgfffieenucfkphepvdegrddvtdejrdeltddrudelgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvgedrvddtjedrledtrdduleegpdhhvghloheplgduledvrdduieekrddtrddvngdpmhgrihhlfhhrohhmpehrrgihrghnughrvgifshesvggrshhtlhhinhhkrdgtrgdprhgtphhtthhopeiishhhqdhushgvrhhsseiishhhrdhorhhgpdhgvghtqdgkihhprfgrshhsfigupehtrhhuvg X-Vade-Score: 0 X-Vade-State: 0 X-EL-IP-NOAUTH: 24.207.90.194 Subject: Re: here document within a switch fails to parse. To: zsh-users@zsh.org References: <20210107153248.GA25249@tarpaulin.shahaf.local2> <14e91024-d65b-e3a0-f5f6-8f0e55d40e8f@eastlink.ca> <10257162.hLkh6h4pyX@thor> <600797233.2799876.1610129180019@mail2.virginmedia.com> <19f99e83-5859-50a9-f598-fb6b633c7d1d@eastlink.ca> From: Ray Andrews Message-id: Date: Sat, 9 Jan 2021 09:28:51 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-version: 1.0 In-reply-to: Content-type: text/plain; charset=utf-8; format=flowed Content-transfer-encoding: 7bit Content-language: en-US X-Seq: 26361 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: Archived-At: On 2021-01-08 11:56 a.m., Bart Schaefer wrote: > Another approach you might consider: > (( dothis )) && { > # all the code you want to skip over > } > That is so much better when it's not a comment block but a code variation, as when debugging something: test1 () { (( 0 ))&&\ { echo "Version #1 of some huge block of code that is buggy and I want to 'back and forth' between it and some alternate" # Only correct code tho, this is parsed! } (( 1 ))&&\ { echo "Version #2 of some huge block of code that is buggy and I want to 'back and forth' between it and some alternate" # Only correct code tho, this is parsed! } } ... or both can be 'off' or both can be active! She is a dominatrix, but if you submit, pleasure awaits. Still, the here document method is preferred for actual long comments because it colorizes differently so the eye quickly passes over in in the editor. But slowly the Tao is revealed. Thank you Sensei.