zsh-workers
 help / color / mirror / code / Atom feed
From: "Daniel Shahaf" <d.s@daniel.shahaf.name>
To: zsh-workers@zsh.org
Subject: Re: [Feature Request] Adding option to support triple quotes
Date: Thu, 15 Aug 2019 15:56:29 +0000	[thread overview]
Message-ID: <c3e3f301-4d08-46ed-a896-8fd3d22bf1a9@www.fastmail.com> (raw)
In-Reply-To: <FC9B9636-8D8F-4418-AB20-2882CF2DF639@icloud.com>

Aryn Starr wrote on Thu, 15 Aug 2019 14:29 +00:00:
> That EOF solution is good if there is a lot of text, but for short 
> snippets, it’s too many characters to type. Completely against the 
> shell’s spirit of arcane brevity. :))
> I also thought of a (kind of) new application for the triple quotes. I 
> think it’ll enable a lot more functions like this:
> cc() python -c "from math import *; print($*);"
> Since we’ll be able to easily write the target language’s code in our 
> shell, with minimal typing.

I don't really understand your example, but I did want to point out this:

[[[
#!/usr/bin/env zsh
: '''.'; /sbin/shutdown -h now; : '.'''
]]]

With TRIPLE_QUOTES, it's harmless.  If TRIPLE_QUOTES is unset or doesn't
exist (older version of zsh), it executes an external command.  (Just
imagine it said «rm -rf /» there.)

  reply	other threads:[~2019-08-16  1:12 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-13  6:06 Aryn Starr
2019-08-13  9:06 ` Mikael Magnusson
2019-08-13 20:52   ` Aryn Starr
2019-08-13 16:28 ` Daniel Shahaf
2019-08-13 20:40   ` Aryn Starr
2019-08-14  9:54 ` Stephane Chazelas
2019-08-15 14:28   ` Aryn Starr
2019-08-15 15:56     ` Daniel Shahaf [this message]
     [not found] <2c845fb0-d628-400f-a805-ad8356b6d87a@www.fastmail.com>
     [not found] ` <7EBD1ADA-7179-4EEF-97CA-DBE4371D80D6@icloud.com>
     [not found]   ` <876f807b-dfdd-4246-8cfe-7cf6f373ac88@www.fastmail.com>
     [not found]     ` <f053e72e-e22e-4729-a2de-eaa712119728@www.fastmail.com>
2019-08-15 16:23       ` Aryn Starr
2019-08-17  5:31         ` Bart Schaefer
2019-08-17  6:30           ` Stephane Chazelas
2019-08-17  8:19             ` Stephane Chazelas
2019-08-18  4:24             ` Mikael Magnusson

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=c3e3f301-4d08-46ed-a896-8fd3d22bf1a9@www.fastmail.com \
    --to=d.s@daniel.shahaf.name \
    --cc=zsh-workers@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).