From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id e41fd896 for ; Tue, 13 Aug 2019 20:41:27 +0000 (UTC) Received: (qmail 9391 invoked by alias); 13 Aug 2019 20:41:19 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 44659 Received: (qmail 19628 invoked by uid 1010); 13 Aug 2019 20:41:19 -0000 X-Qmail-Scanner-Diagnostics: from pv50p00im-ztdg10011201.me.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.101.2/25538. spamassassin: 3.4.2. Clear:RC:0(17.58.6.39):SA:0(-4.3/5.0):. Processed in 2.546596 secs); 13 Aug 2019 20:41:19 -0000 X-Envelope-From: whereislelouch@icloud.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at icloud.com designates 17.58.6.39 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=icloud.com; s=1a1hai; t=1565728843; bh=CVLNsGshM/DwtZiZt2Wl/YdnW4/MwccXAUc0fe2yCrg=; h=Content-Type:Subject:From:Date:Message-Id:To; b=XkPDUAbG/fgQeQOA7vnSw43j3it3JwyY9AQdnLHYXrRuOlXRvYss68zQew3CukJH1 xoppXN4gdjVB8CMkRSAEj1swdmLxJyDVH8jWglrvFBu9LSD8h5rh6L3OPNAFxWDtQf BodEe81Y0TaL+jQUoxo3Pt21PlgPm9ZR2b/vJuxrA1H69Wm1qf2lLHLA7KpC6/i0Rv /yNdkLgk61hYPrHY7WgQHAXVzHnEt25naaSctKpQWyinPSLEtsqTEboI4m3IcN6LNE iufxCedEV+aOA5SbC2WIABW31GFirMI7zj52eGIVRB7jEhYUhZjR5g9XTrVaL1b1VQ a6COlkZpg0Ogg== Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (1.0) Subject: Re: [Feature Request] Adding option to support triple quotes From: Aryn Starr X-Mailer: iPad Mail (16F203) In-Reply-To: Date: Wed, 14 Aug 2019 01:10:37 +0430 Cc: zsh-workers@zsh.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <6EA30061-5610-4CCA-93FB-0A160E2002A3@icloud.com> To: Daniel Shahaf X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-08-13_06:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 mlxscore=0 mlxlogscore=704 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1812120000 definitions=main-1908130197 The tripe single quotes can have single quotes in them, and the triple doubl= e quotes can have double quotes. It=E2=80=99s useful for normal English interpolation: =E2=80=9C=E2=80=9D=E2=80=9DI=E2=80=99m going to kill process =E2=80=9C${some= _process}.=E2=80=9D Proceed? (Y/n)=E2=80=9D=E2=80=9D=E2=80=9D It=E2=80=99s useful for regexes: [[ =E2=80=9C$sth=E2=80=9D =3D~ =E2=80=98=E2=80=99=E2=80=99 =E2=80=9C\w+=E2=80= =9D=3D=E2=80=98?(\d+)=E2=80=99? =E2=80=98=E2=80=99=E2=80=99 ]] It=E2=80=99s useful for putting code in strings, which is extremely useful f= or macros, code generators, evaling code of other languages (node -e, python= -c, etc): =E2=80=9C=E2=80=9D=E2=80=9D $var_name=3D=E2=80=9C\$$var_value=E2=80=9D =E2=80=9C=E2=80=9D=E2=80=9D There are quite a few =E2=80=9C...=E2=80=9D=E2=80=99=E2=80=9D=E2=80=99=E2=80= =9D...=E2=80=9D and the like already in my code, and they are make the code u= nreadable and ugly.=20 > On Aug 13, 2019, at 8:58 PM, Daniel Shahaf wrote:= >=20 > Aryn Starr wrote on Tue, 13 Aug 2019 06:08 +00:00: >> Adding an option to zsh to support triple quotes (TRIPLE_QUOTES) would=20= >> make possible much more readable code. >> We can have double triple quotes that support `$` interpolation, and=20 >> triple single quotes that just take raw strings. >=20 > What would be the difference to ordinary =C2=AB'=E2=80=A6'=C2=BB and =C2=AB= "=E2=80=A6"=C2=BB string > literals? They can already be multiline.