zsh-users
 help / color / mirror / code / Atom feed
From: "John Reese" <john.reese@gmail.com>
To: "Zsh Users" <zsh-users@sunsite.dk>
Subject: Feature creep suggestion: make <<- more flexible
Date: Sat, 5 Aug 2006 18:56:39 -0700	[thread overview]
Message-ID: <488030720608051856t53ccbef0ie69a1c2bcc385eb6@mail.gmail.com> (raw)

I like the idea of <<- because it makes scripts prettier by not
requiring sudden mid-script de-indentation, but since it only works
for tabs I usually end up not using it and going for grungier
workarounds like:

sed 's/^    //' << END
...
END | cmd

Is there any reason it should have to be tabs?  Why not just strip any
sequence of spaces and tabs? If backwards compatibility is an issue in
just this one tiny corner of zsh, you could make it controlled by an
option.

See, I live in a tab-hating 80-column-constrained world where tabs are
always 8 wide in case someone else uses them expecting things to line
up, but where I avoid using them myself, especially in cases like here
documents where I might be trying to generate a nearly 80 column
document from within an 80 column shell script.

In fact, I think it'd be even more useful if it just looked at the
first line to see what leading whitespace it had and stripped just
that from all succeeding lines.  That way you could have lines within
the here document that were more indented than other lines in the
output.


                 reply	other threads:[~2006-08-06  1:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=488030720608051856t53ccbef0ie69a1c2bcc385eb6@mail.gmail.com \
    --to=john.reese@gmail.com \
    --cc=zsh-users@sunsite.dk \
    /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).