zsh-users
 help / color / mirror / code / Atom feed
From: Ray Andrews <rayandrews@eastlink.ca>
To: zsh-users@zsh.org
Subject: Re: here document within a switch fails to parse.
Date: Sat, 9 Jan 2021 09:28:51 -0800	[thread overview]
Message-ID: <b1f34339-d1e8-08e0-c6e5-df345655361c@eastlink.ca> (raw)
In-Reply-To: <CAH+w=7YHo8_wuksNPQbr5b8TZpWfSfag9FgpHbZna_s7rxXPXg@mail.gmail.com>

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.



  parent reply	other threads:[~2021-01-09 17:29 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-06 15:13 Ray Andrews
2021-01-06 16:20 ` Daniel Shahaf
2021-01-06 17:17   ` Ray Andrews
2021-01-06 17:58     ` Lawrence Velázquez
2021-01-06 19:18     ` Bart Schaefer
2021-01-07  7:55       ` Ray Andrews
2021-01-07 15:32         ` Daniel Shahaf
2021-01-07 20:16           ` Ray Andrews
2021-01-08 15:27             ` Karsten Borgwaldt
2021-01-08 15:53               ` Lawrence Velázquez
2021-01-08 17:13                 ` Ray Andrews
2021-01-08 18:06                   ` Peter Stephenson
2021-01-08 19:39                     ` Ray Andrews
2021-01-08 19:56                       ` Bart Schaefer
2021-01-09  0:45                         ` Ray Andrews
2021-01-09 17:28                         ` Ray Andrews [this message]
2021-01-12 13:28             ` Daniel Shahaf
2021-01-12 14:45               ` Ray Andrews
2021-01-13 16:17                 ` Daniel Shahaf
2021-01-13 21:57                   ` Pier Paolo Grassi
2021-01-13 23:39                     ` Ray Andrews
2021-01-13 23:54                       ` Lawrence Velázquez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b1f34339-d1e8-08e0-c6e5-df345655361c@eastlink.ca \
    --to=rayandrews@eastlink.ca \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).