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,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 22756 invoked from network); 13 Feb 2021 04:34:28 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 13 Feb 2021 04:34:28 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1613190868; b=JgdMPh9E5G5I4dW3SDdsIph+A3Sx61hrp9yuJwtDmzHUWkbYBfpNN2UJuNM6TM7dbuQLtSBDLc T1KPqu5Bq21qMVYCcneTccHWXD9sa5pT23NUvUacNjHB3mIxNMFavPkGYUzCKfT4b4HQoxvwrP mwrtH+ZuS+D8mvofdqzxoutgDoieXXknC9ysxin4sYuyvlT5d20EKMroeGBljiUDQbc+krgXS4 V6ZHYnMmaDcrp815+pOaTwX9dv+9HWmLdEesyyyMeSbmVBS1yNeq3mbSIvcZxQ7HrhGN+T4FWp lj9Arz6ixchp9ZznN5DLomK/grXYBp0F37aS8nHxPd1EtQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-oi1-f171.google.com) smtp.remote-ip=209.85.167.171; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1613190868; bh=+YKq1eOkmoVxWlxqyr1P7bJnY6hW6Jk5+f9LGiMQ/AA=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:Cc:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:DKIM-Signature:DKIM-Signature; b=ie2n/OTLUqLzPuGJKEapM3QvkCLWYI2mVCZ7uBnyZ4q3F4IfHHBdSHWyNNHuqMsVDTDUdEa6NY YqcH/D5JPLep7Spkp+8nD8LYCzwHwgUVZbSpr3sDICD9JlBwoRhJjRWmJEap7c9gl8P/6AUEMY 9nzmQeMFejt/S3DZxetwOD8dNzG5qdwAw/KYrUtUio4xMHCckbXnUGQJjGEO9MOUZKbhlDLpBF T1YdplqrUog8ohqUolalXtU4axJkfI/d2Nmknr9gGrtGPyuOcMpvwI7xfhYRycgyY291rSfySA GUB04AplOx38AOwCU90vltaMQPrXWaOM1jNI6QABuIvPHQ==; 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-Type:Cc:To:Subject:Message-ID :Date:From:In-Reply-To:References:MIME-Version:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=p1wkBbzbKepix5JIbgCiOLTndEmpRN3VJqXyi2ckMDQ=; b=HTK3UBihoFZPpAUIwJ+togGzse G0qwl9DgslGUfhAUHIFyHIkLkEks0F9INsdV85hyiQe0NX6rtyTaK3inUHvyfp8fM+0dbutnir1rc gYXU1H+98IKoY0pScNI5B3yCQmY2qciWPL/kEmnTZNjnQDHpUCOJ8P0Y+araoj6ipplgyQfgcAl2y 2SpeU+e6LILFhQpOYZZOKk+MnbEgPKoQSOeVUca8yCumAbLJfYMsEkxZQesuEodD211jIYYtR1SvC Or2FwD8Pmb2r2TfLKloqgav1+SujNnTy79lwSSEdxSqbA/ngwvMSJMVJfyD8bfNNiIGeE5lggwP9K GX885N/g==; Received: from authenticated user by zero.zsh.org with local id 1lAmdV-000GkL-2d; Sat, 13 Feb 2021 04:34:25 +0000 Authentication-Results: zsh.org; iprev=pass (mail-oi1-f171.google.com) smtp.remote-ip=209.85.167.171; dkim=pass header.d=brasslantern-com.20150623.gappssmtp.com header.s=20150623 header.a=rsa-sha256; dmarc=none header.from=brasslantern.com; arc=none Received: from mail-oi1-f171.google.com ([209.85.167.171]:35163) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1lAmdA-000GZd-7k; Sat, 13 Feb 2021 04:34:05 +0000 Received: by mail-oi1-f171.google.com with SMTP id l3so2019627oii.2 for ; Fri, 12 Feb 2021 20:34:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=p1wkBbzbKepix5JIbgCiOLTndEmpRN3VJqXyi2ckMDQ=; b=n4E+sfmIANKAaoYGRrkxIfUfKd/cTxbEbAILONmv6DzCqNNXzOWchYExOhbL+5M+Zd iJ/1+4Vbz4+4Bm1AjvXkKTTp9I2mc6Ga5ScXx3lwZCrIDki1GbjBhBgQ7xnzfLW7DNeY 2bGKKthkuoKFQQRdWb2jBOI0KVnU83T3HUoyBrMtkD4cmrcS8FyC/TrgQD/oBPzbf4DW MVszn0MOlnIB+8HNsIL0/OQnUk+7JwM36oYW17V3YHkDli0dP4D0N/iKYBi74ErZziBF MNQ25UXAhTbYkiOfsaVm+z5H8DGSqWJR2Dj1YTrX7hC8l13OYPk4Y/YqUWLtxyqL0+fJ 8hRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=p1wkBbzbKepix5JIbgCiOLTndEmpRN3VJqXyi2ckMDQ=; b=gHfbg/7mpmAFRUZpxug9Tbf8p3i5axyi1q4K9nqeoI6EchEG5Tlm3msR0rhyhvluI2 1zQNosuhoV/Nt5cy+0pEVEy5ISuD+RicgTgH/FtQIw7yvLpLnD8yESxfnYfEnzBKWydJ w9JIFODSyaGMnpIp95J41LrfeD0LGmQ+0TaC5YAR5gZxNPO2h6vAN8CL0g+C77mubnu9 1NpvSQuTOViyCO9tuQ7dzAnD4hutGCNTlKzjF5ITb7igmUKjf5yaeYAVHQGIsLsHDjUH cJtpy4oDBWwLdPyocgDqQhVkff0sKtnWEil9mMoOM01fQQyhSMn0Dut/qs/StMhxWgwX bNmg== X-Gm-Message-State: AOAM5305fsxbekfipkv9inVJVHRgfGMGEH3R/uZh97fmV3bAT8FOtTJp EH++M7blAn7sTDeWcTawWpIZiL1/RJ/MZf8s/VP0YA== X-Google-Smtp-Source: ABdhPJy+d+q1HutIM1aRyLj6Cc5jFJ9Z32JCohhXARo62L8TSdwS3xnCsqCVmwr8qoJ1WhwcXbOZitXaxtGhWnnXlVU= X-Received: by 2002:aca:4e8e:: with SMTP id c136mr1951231oib.173.1613190842939; Fri, 12 Feb 2021 20:34:02 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Bart Schaefer Date: Fri, 12 Feb 2021 20:33:51 -0800 Message-ID: Subject: Re: Block comments ala Ray To: Roman Perepelitsa Cc: Zsh hackers list Content-Type: text/plain; charset="UTF-8" X-Seq: 48036 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Archived-At: On Thu, Feb 11, 2021 at 10:42 PM Roman Perepelitsa wrote: > > Do these benefits justify adding new syntax that's unique to zsh? It's not as though zsh doesn't have lots of other unique syntax. > On Fri, Feb 12, 2021 at 7:17 AM Bart Schaefer wrote: > > > > Do you disagree with me about how strangely this -- > > > > print this <# part is a comment > > (lah-di-dah for perhaps hundreds of lines) > > but this part #> is the rest of the command > > > > -- implicitly behaves if the embedded newlines can be inlined? > > If this were valid syntax, I would expect it to work like in C. In > other words, I would expect there to be two commands: > > print this > is the rest of the command It turns out not to be very difficult to make !# ... #! (or <# ... #>) work that way, but ... that's not really how it works in C. You wouldn't expect int /* watch me explain why this next variable is not a float */ thing; to behave like "int; thing;". My original point is that the shell doesn't have the syntactic clues to tell you that "print this" (in the example) is not already a complete command, the way you can tell in C by the missing semicolon that something must eventually be coming after "int".