zsh-users
 help / color / mirror / code / Atom feed
* Feature creep suggestion: make <<- more flexible
@ 2006-08-06  1:56 John Reese
  0 siblings, 0 replies; only message in thread
From: John Reese @ 2006-08-06  1:56 UTC (permalink / raw)
  To: Zsh Users

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.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-08-06  1:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-06  1:56 Feature creep suggestion: make <<- more flexible John Reese

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).