Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [Feature Request] Adding option to support triple quotes
- X-seq: zsh-workers 44673
- From: "Daniel Shahaf" <d.s@xxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: [Feature Request] Adding option to support triple quotes
- Date: Thu, 15 Aug 2019 15:56:29 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=mime-version:message-id:in-reply-to :references:date:from:to:subject:content-type :content-transfer-encoding; s=fm1; bh=XecbsZT46C+PtVpdd8cF6bcEyU bha2bbcOxjES8Ox1U=; b=eN13agqRy6SQ9FCg87EMKgIYbX6CXa68D9AvafiCnM QLDt73bdL0CNsdKouaVL2kdeEJJglUN6zdd2m4JoxLPtVMIKtMXM8d8d8gde83Yo 9Lr2wTXZICXPlpHEsc3RaY/BN7cUoLoOKR7EFSS/tgZXgkU00NX/OHFLXWhxI5Ff rdKm31MB19JVhK6XYvA7HaKVJdw7L2X9dSYVMd1EybM3xnE+MpEbxRLtNRVyOzeo YGEsbJurB+9qP6f/RD+bgYHIC2PKRwAX9GzDYh51BuaRM8kb4bbpwBqnwso6QLKY baV7NZQVIGj+hBVUO4lpERBWPcEsiheHz/FT1gluuvyw==
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=XecbsZT46C+PtVpdd8cF6bcEyUbha2bbcOxjES8Ox 1U=; b=iypRQB+Qnof2denJ/3GIidTRSM7D444KEDC8gF/w+KXFOHD54tyE/NhQ0 QNbvXVE4G+b5aLWDFtqmnt8+gbHC3oBCtvddtDUJjri0ZVvK3oCD8exdxXqt9Il/ soY0D0SU5RFBG1A904DrzDtQ38C6uBZZYHLss8DNcE/6CHQuSG7hovLWDzRpIkh9 TSJ7EvM/FgpPcfGFUT6Jm3ssQ8Uq8878xxh0r68zaxtjV9scCAkUIOJb3x6rGPPn zii1U7HGgoy59/99kwxd1c6g4mcXqzNvCMw7dGDHDrOMKcAe/Y7KWMLDkQ4quePI ips95inysfZ4P9/jIDKetRtdKoEXQ==
- In-reply-to: <FC9B9636-8D8F-4418-AB20-2882CF2DF639@icloud.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <6EA30061-5610-4CCA-93FB-0A160E2002A3@icloud.com> <20190814095449.s7mgevyo5tdhfyby@chaz.gmail.com> <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.)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author