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 44662
- From: Stephane Chazelas <stephane.chazelas@xxxxxxxxx>
- To: Aryn Starr <whereislelouch@xxxxxxxxxx>
- Subject: Re: [Feature Request] Adding option to support triple quotes
- Date: Wed, 14 Aug 2019 10:54:49 +0100
- Cc: zsh-workers@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to:user-agent; bh=HflS5Ws2RCBjQ+F9e1Enj1zurCwZHrLkrxBvc9i1B3Y=; b=ofafWv5l4mj/DxgejkAUlQod53pJEId+qhWOx5NMdMXyKQxUrrutbje/5hyV+hF7eX 5zGddNJQu0OF4IIrg0+YZi2n/ufJAWGTvNaLmA2PwFBU5beDPt96EAmd6c3ANtXIZyhX ROHbvToW1IhzQDJMN2G5DQq0VJsuFscHWggZT/YstF3rFkn+WTtwDHwOoIqn7lAb6biq MBRpMwc4UyyQtSAvreLg5DI6oj53DFDUWIQbVZv165E3IVePCguh9+fTRDtyEYr3Xm3a 1299iNxt/GqfZNkVK5twa/zZYf1c9K5qsoTcALrxXUZAkqMmwk4ndNUodEhocstV/T8y kRXw==
- In-reply-to: <6EA30061-5610-4CCA-93FB-0A160E2002A3@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>
- Mail-followup-to: Aryn Starr <whereislelouch@xxxxxxxxxx>, zsh-workers@xxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <6EA30061-5610-4CCA-93FB-0A160E2002A3@icloud.com>
2019-08-13 10:36:53 +0430, Aryn Starr:
> Adding an option to zsh to support triple quotes
> (TRIPLE_QUOTES) would make possible much more readable code.
[...]
We could also implement mksh's "$(<<'EOF'
arbitrary text that mustn't end in empty lines
EOF
)"
That already works in zsh, but is not optimised like in mksh as
it does "$(cat <<'EOF'
arbitrary text that mustn't end in empty lines
EOF
)" while mksh treats it specially as effectively a kind of
quotes.
mksh also supports $(<<'EOF'
foo
EOF)
(though that's probably not POSIX).
See also perl's q(...) and qq(...) that are more compatible with
the shell syntax than those python '''/""".
See:
$ a="'"; print -r ${(qq)a}
''\'''
--
Stephane
Messages sorted by:
Reverse Date,
Date,
Thread,
Author