Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Feature creep suggestion: make <<- more flexible
- X-seq: zsh-users 10580
- From: "John Reese" <john.reese@xxxxxxxxx>
- To: "Zsh Users" <zsh-users@xxxxxxxxxx>
- Subject: Feature creep suggestion: make <<- more flexible
- Date: Sat, 5 Aug 2006 18:56:39 -0700
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=rpai9r/jNnBOEs8etmjvJShMfS0DNKd3Fula2ugUEaTGPclznzQR6DW61kI93gMhely6X2W8LS+3F9jVkqBX/5Ov1lEIpBv3tngl9BVh25djCTYZqOjXTzYruWAJGP5wqLuD1NNyRXFKrWcScyki9KghyR1fnv/n2PwIbl4CrqE=
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author