Hacker News new | ask | show | jobs
by tdons 2103 days ago
You can comment using a hack; check this out:

  command `# a comment` \
    --longopt1 `# another comment` \
    --longopt2 arg \
    argument
2 comments

I didn't mean commenting arguments for documentation but commenting them out while you're writing and testing the script. I.e. this won't work:

  command `# a comment` \
    # --longopt1 \
    --longopt2 arg \
    argument
AFAIK there's no hack for this.

EDIT: Oh, `# a comment`. Didn't notice that. I'm going to explore it, thanks.

You should probably note that this hack spawns an additional shell process per comment :)